本文整理汇总了Java中org.netbeans.jpa.modeler.spec.DiscriminatorColumn类的典型用法代码示例。如果您正苦于以下问题:Java DiscriminatorColumn类的具体用法?Java DiscriminatorColumn怎么用?Java DiscriminatorColumn使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DiscriminatorColumn类属于org.netbeans.jpa.modeler.spec包,在下文中一共展示了DiscriminatorColumn类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processDiscriminatorColumn
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
private void processDiscriminatorColumn() {
DiscriminatorColumn parsedDiscriminatorColumn = entity.getDiscriminatorColumn();
if (parsedDiscriminatorColumn == null) {
return;
}
DiscriminatorType parsedDiscriminatorType = parsedDiscriminatorColumn.getDiscriminatorType();
DiscriminatorColumnSnippet discriminatorColumn = new DiscriminatorColumnSnippet();
discriminatorColumn.setName(parsedDiscriminatorColumn.getName());
discriminatorColumn.setColumnDefinition(parsedDiscriminatorColumn.getColumnDefinition());
if (parsedDiscriminatorColumn.getLength() != null) {
discriminatorColumn.setLength(parsedDiscriminatorColumn.getLength());
}
if (parsedDiscriminatorType != null) {
DiscriminatorType discriminatorType = DiscriminatorType.valueOf(parsedDiscriminatorType.value());
discriminatorColumn.setDiscriminatorType(discriminatorType);
}
if (!discriminatorColumn.isDefault()) {
classDef.setDiscriminatorColumn(discriminatorColumn);
}
}
示例2: JPAMFieldDefinition
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
public JPAMFieldDefinition(Entity intrinsicClass) {
this.intrinsicClass = intrinsicClass.getOrignalObject() != null ? (Entity) intrinsicClass.getOrignalObject() : intrinsicClass;
if (intrinsicClass.getDiscriminatorColumn() == null) {
intrinsicClass.setDiscriminatorColumn(new DiscriminatorColumn());
}
this.discriminatorColumn = intrinsicClass.getDiscriminatorColumn();
}
示例3: evaluateName
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
@Override
protected String evaluateName() {
DiscriminatorColumn discriminatorColumn = this.getBaseElementSpec().getAttribute();
if (StringUtils.isBlank(discriminatorColumn.getName())) {
return "DTYPE";
} else {
return discriminatorColumn.getName();
}
}
示例4: setColumnTypeSelectedItem
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
private void setColumnTypeSelectedItem(DiscriminatorColumn col) {
column_type_ComboBox.setSelectedItem(column_type_ComboBox.getItemAt(0));
for (int i = 0; i < column_type_ComboBox.getItemCount(); i++) {
Property property = (Property) column_type_ComboBox.getItemAt(i);
if (col != null && (DiscriminatorType) property.getKey() == col.getDiscriminatorType()) {
column_type_ComboBox.setSelectedItem(property);
break;
}
}
}
示例5: getValue
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
@Override
public InheritanceHandler getValue() {
InheritanceType inheritanceType = (InheritanceType) ((Property) strategy_ComboBox.getSelectedItem()).getKey();
if (type == ROOT || type == BRANCH) {
if (inheritanceHandler.getInheritance() == null) {
inheritanceHandler.setInheritance(new Inheritance());
}
inheritanceHandler.getInheritance().setStrategy(inheritanceType);
DiscriminatorType discriminatorType = (DiscriminatorType) ((Property) column_type_ComboBox.getSelectedItem()).getKey();
if (column_name_TextField.getText().isEmpty() && column_length_Spinner.getValue().equals(30)
&& column_def_TextArea.getText().isEmpty() && discriminatorType == DiscriminatorType.STRING) {
inheritanceHandler.setDiscriminatorColumn(null);
} else {
inheritanceHandler.setDiscriminatorColumn(new DiscriminatorColumn());
inheritanceHandler.getDiscriminatorColumn().setDiscriminatorType(discriminatorType);
inheritanceHandler.getDiscriminatorColumn().setName(column_name_TextField.getText());
inheritanceHandler.getDiscriminatorColumn().setLength((Integer) column_length_Spinner.getValue());
inheritanceHandler.getDiscriminatorColumn().setColumnDefinition(column_def_TextArea.getText());
}
} else {
inheritanceHandler.setInheritance(null);
inheritanceHandler.setDiscriminatorColumn(null);
}
boolean isAbstract = TRUE.equals(entityWidget.getBaseElementSpec().getAbstract());
if (!isAbstract && (type == LEAF || type == BRANCH || type == ROOT)) {
inheritanceHandler.setDiscriminatorValue(value_TextField.getText());
} else {
inheritanceHandler.setDiscriminatorValue(null);
}
return inheritanceHandler;
}
示例6: DBDiscriminatorColumn
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
public DBDiscriminatorColumn(String name, DiscriminatorColumn attribute) {
super(name, attribute);
}
示例7: createPropertySet
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
@Override
public void createPropertySet(ElementPropertySet set) {
DiscriminatorColumn discriminatorColumn = this.getBaseElementSpec().getAttribute();
set.createPropertySet(this, discriminatorColumn, getPropertyChangeListeners());
}
示例8: updateName
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
@Override
protected void updateName(String name) {
DiscriminatorColumn discriminatorColumn = this.getBaseElementSpec().getAttribute();
discriminatorColumn.setName(name);
}
示例9: getDiscriminatorColumn
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
/**
* Gets the value of the discriminatorColumn property.
*
* @return possible object is {@link DiscriminatorColumn }
*
*/
public DiscriminatorColumn getDiscriminatorColumn();
示例10: setDiscriminatorColumn
import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
/**
* Sets the value of the discriminatorColumn property.
*
* @param value allowed object is {@link DiscriminatorColumn }
*
*/
public void setDiscriminatorColumn(DiscriminatorColumn value);