当前位置: 首页>>代码示例>>Java>>正文


Java DiscriminatorColumn类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:26,代码来源:EntityGenerator.java

示例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();
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:8,代码来源:JPAMFieldDefinition.java

示例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();
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:10,代码来源:DiscriminatorColumnWidget.java

示例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;
        }
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:11,代码来源:InheritancePanel.java

示例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;
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:37,代码来源:InheritancePanel.java

示例6: DBDiscriminatorColumn

import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
public DBDiscriminatorColumn(String name, DiscriminatorColumn attribute) {
    super(name, attribute);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:4,代码来源:DBDiscriminatorColumn.java

示例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());
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:6,代码来源:DiscriminatorColumnWidget.java

示例8: updateName

import org.netbeans.jpa.modeler.spec.DiscriminatorColumn; //导入依赖的package包/类
@Override
protected void updateName(String name) {
    DiscriminatorColumn discriminatorColumn = this.getBaseElementSpec().getAttribute();
    discriminatorColumn.setName(name);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:6,代码来源:DiscriminatorColumnWidget.java

示例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();
 
开发者ID:jeddict,项目名称:jCode,代码行数:8,代码来源:InheritanceHandler.java

示例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);
 
开发者ID:jeddict,项目名称:jCode,代码行数:8,代码来源:InheritanceHandler.java


注:本文中的org.netbeans.jpa.modeler.spec.DiscriminatorColumn类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。