本文整理汇总了Java中org.netbeans.modeler.properties.nentity.NAttributeEntity.setColumns方法的典型用法代码示例。如果您正苦于以下问题:Java NAttributeEntity.setColumns方法的具体用法?Java NAttributeEntity.setColumns怎么用?Java NAttributeEntity.setColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.modeler.properties.nentity.NAttributeEntity
的用法示例。
在下文中一共展示了NAttributeEntity.setColumns方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPrimaryKeyJoinColumnsProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getPrimaryKeyJoinColumnsProperty(String id, String name, String desc, EntityWidget entityWidget, Entity entity) {
JPAModelerScene modelerScene = entityWidget.getModelerScene();
final List<? extends PrimaryKeyJoinColumn> primaryKeyJoinColumnsSpec = entity.getPrimaryKeyJoinColumn();
final NAttributeEntity attributeEntity = new NAttributeEntity(id, name, desc);
attributeEntity.setCountDisplay(new String[]{"No PrimaryKeyJoinColumns exist", "One PrimaryKeyJoinColumn exist", "PrimaryKeyJoinColumns exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("Column Name", false, String.class));
columns.add(new Column("Referenced Column Name", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new PrimaryKeyJoinColumnPanel(entity));
attributeEntity.setTableDataListener(new NEntityDataListener<>(primaryKeyJoinColumnsSpec,
t -> Arrays.asList(t.getName(), t.getReferencedColumnName())));
entityWidget.addPropertyVisibilityHandler("PrimaryKeyJoinColumns", () -> {
InheritanceStateType inheritanceState = entityWidget.getInheritanceState();
return inheritanceState == InheritanceStateType.BRANCH || inheritanceState == InheritanceStateType.LEAF;
});
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例2: getNamedStoredProcedureQueryProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getNamedStoredProcedureQueryProperty(JPAModelerScene modelerScene, Entity entity) {
final List<NamedStoredProcedureQuery> namedStoredProcedureQueriesSpec = entity.getNamedStoredProcedureQuery();
final NAttributeEntity attributeEntity = new NAttributeEntity("NamedStoredProcedureQueries", "Named StoredProcedure Queries", getMessage(PropertiesHandler.class, "INFO_STORED_PROCEDURE_QUERY"));
attributeEntity.setCountDisplay(new String[]{"No NamedStoredProcedureQueries exist", "One NamedStoredProcedureQuery exist", "NamedStoredProcedureQueries exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Name", false, String.class));
columns.add(new Column("ProcedureName", false, String.class));
columns.add(new Column("Parameters", false, Integer.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new NamedStoredProcedureQueryPanel(modelerScene.getModelerFile()));
attributeEntity.setTableDataListener(new NEntityDataListener<>(namedStoredProcedureQueriesSpec,
t -> Arrays.asList(t.isEnable(), t.getName(), t.getProcedureName(), t.getParameter().size()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例3: getNamedQueryProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getNamedQueryProperty(JPAModelerScene modelerScene, IdentifiableClass identifiableClass) {
final NAttributeEntity attributeEntity = new NAttributeEntity("NamedQueries", "Named Queries", getMessage(PropertiesHandler.class, "INFO_JPQL_QUERY"));
attributeEntity.setCountDisplay(new String[]{"No NamedQueries exist", "One NamedQuery exist", "NamedQueries exist"});
final List<NamedQuery> namedQueriesSpec = identifiableClass.getNamedQuery();
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Name", false, String.class));
columns.add(new Column("Query", false, String.class));
columns.add(new Column("Lock Mode Type", false, true, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new NamedQueryPanel(identifiableClass, modelerScene.getModelerFile()));
attributeEntity.setTableDataListener(new NEntityDataListener<>(namedQueriesSpec,
t -> Arrays.asList(t.isEnable(), getShortQueryName(identifiableClass, t.getName()), t.getQuery(), t.getLockMode()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例4: getNamedEntityGraphProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getNamedEntityGraphProperty(final EntityWidget entityWidget) {
JPAModelerScene modelerScene = entityWidget.getModelerScene();
final List<NamedEntityGraph> entityGraphsSpec = entityWidget.getBaseElementSpec().getNamedEntityGraph();
final NAttributeEntity attributeEntity = new NAttributeEntity("NamedEntityGraphs", "Named Entity Graphs", getMessage(PropertiesHandler.class, "INFO_ENTITY_GRAPH"));
attributeEntity.setCountDisplay(new String[]{"No EntityGraphs exist", "One EntityGraph exist", "EntityGraphs exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Name", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new NamedEntityGraphPanel(entityWidget));
attributeEntity.setTableDataListener(new NEntityDataListener<>(entityGraphsSpec,
t -> Arrays.asList(t.isEnable(), t.getName()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例5: getConverterProperties
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getConverterProperties(JPAModelerScene scene, List<Converter> converters) {
final NAttributeEntity attributeEntity = new NAttributeEntity("converters", "Converters", getMessage(PropertiesHandler.class, "INFO_COVERTER"));
attributeEntity.setCountDisplay(new String[]{"No Converter exist", "One Converter exist", "Converters exist"});
attributeEntity.setCustomDialog(new ConverterPanel(scene.getModelerFile()));
List<Column> columns = new ArrayList<>();
columns.add(new Column("Converter Class", false, String.class));
columns.add(new Column("Attribute Type", false, String.class));
columns.add(new Column("DB Field Type", false, String.class));
columns.add(new Column("Auto Apply", true, Boolean.class));
attributeEntity.setColumns(columns);
attributeEntity.setTableDataListener(new NEntityDataListener<>(converters,
t -> Arrays.asList(t.getClazz(), t.getAttributeType(), t.getFieldType(), t.isAutoApply()),
(t, row) -> t.setAutoApply((boolean) row[4])));
return new NEntityPropertySupport(scene.getModelerFile(), attributeEntity);
}
示例6: getIndexProperties
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getIndexProperties(TableWidget<? extends DBTable> tableWidget) {
final NAttributeEntity attributeEntity = new NAttributeEntity("Index", "Index", "Index of Database Table");
attributeEntity.setCountDisplay(new String[]{"No Index exist", "One Index exist", "Indexes exist"});
List<Index> indices = tableWidget.getBaseElementSpec().getIndexes();
List<Column> columns = new ArrayList<>();
columns.add(new Column("Name", false, String.class));
columns.add(new Column("Columns", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new IndexPanel(tableWidget));
attributeEntity.setTableDataListener(new NEntityDataListener<>(indices,
t -> Arrays.asList(t.getName(), t.toString())));
return new NEntityPropertySupport(tableWidget.getModelerScene().getModelerFile(), attributeEntity);
}
示例7: getUniqueConstraintProperties
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getUniqueConstraintProperties(TableWidget<? extends DBTable> tableWidget) {
final NAttributeEntity attributeEntity = new NAttributeEntity("UniqueConstraint", "Unique Constraint", "Unique Constraints of Database Table");
attributeEntity.setCountDisplay(new String[]{"No UniqueConstraints exist", "One UniqueConstraint exist", "UniqueConstraints exist"});
Set<UniqueConstraint> uniqueConstraints = tableWidget.getBaseElementSpec().getUniqueConstraints();
List<Column> columns = new ArrayList<>();
columns.add(new Column("Name", false, String.class));
columns.add(new Column("Columns", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new UniqueConstraintPanel(tableWidget));
attributeEntity.setTableDataListener(new NEntityDataListener<>(uniqueConstraints,
t -> Arrays.asList(t.getName(), t.toString())));
return new NEntityPropertySupport(tableWidget.getModelerScene().getModelerFile(), attributeEntity);
}
示例8: getJoinColumnsProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getJoinColumnsProperty(String id, String name, String desc, JPAModelerScene modelerScene, final List<? extends JoinColumn> joinColumnsSpec, Entity entity) {
final NAttributeEntity attributeEntity = new NAttributeEntity(id, name, desc);
attributeEntity.setCountDisplay(new String[]{"No JoinColumns exist", "One JoinColumn exist", "JoinColumns exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("Column Name", false, String.class));
columns.add(new Column("Referenced Column Name", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new JoinColumnPanel(entity));
attributeEntity.setTableDataListener(new NEntityDataListener<>(joinColumnsSpec,
t -> Arrays.asList(t.getName(), t.getReferencedColumnName())));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例9: getAttributeOverridesProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getAttributeOverridesProperty(String id, String name, String desc, JPAModelerScene modelerScene, final Set<AttributeOverride> attributeOverridesSpec) {
final NAttributeEntity attributeEntity = new NAttributeEntity(id, name, desc);
attributeEntity.setCountDisplay(new String[]{"No AttributeOverrides exist", "One AttributeOverride exist", "AttributeOverrides exist"});
attributeEntity.setColumns(Arrays.asList(
new Column("Attribute Name", false, String.class),
new Column("Column Name", false, String.class)
));
attributeEntity.setTableDataListener(new NEntityDataListener<>(attributeOverridesSpec,
t -> Arrays.asList(t.getName(), t.getColumn() != null ? t.getColumn().getName() : EMPTY)));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例10: getAssociationOverridesProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getAssociationOverridesProperty(String id, String name, String desc, JPAModelerScene modelerScene, final Set<AssociationOverride> associationOverridesSpec) {
final NAttributeEntity attributeEntity = new NAttributeEntity(id, name, desc);
attributeEntity.setCountDisplay(new String[]{"No AssociationOverrides exist", "One AssociationOverride exist", "AssociationOverrides exist"});
attributeEntity.setColumns(Arrays.asList(
new Column("Association Name", false, String.class),
new Column("JoinTable Name", false, String.class),
new Column("JoinColumn Size", false, Integer.class)
));
attributeEntity.setTableDataListener(new NEntityDataListener<>(associationOverridesSpec,
(t) -> Arrays.asList(t.getName(), t.getJoinTable().getName(), t.getJoinColumn().size())));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例11: getResultSetMappingsProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getResultSetMappingsProperty(JPAModelerScene modelerScene, final Entity entity) {
final Set<SqlResultSetMapping> sqlResultSetMappingSpec = entity.getSqlResultSetMapping();
final NAttributeEntity attributeEntity = new NAttributeEntity("ResultSetMappings", "ResultSet Mappings", getMessage(PropertiesHandler.class, "INFO_RESULTSET_MAPPING"));
attributeEntity.setCountDisplay(new String[]{"No ResultSet Mappings", "One ResultSet Mapping", " ResultSet Mappings"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("ResultSet Name", true, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new ResultSetMappingsPanel(modelerScene.getModelerFile(), entity));
attributeEntity.setTableDataListener(new NEntityDataListener<>(sqlResultSetMappingSpec,
t -> Arrays.asList(t.getName()),
(t, row) -> t.setIdentifiableClass(entity)));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例12: getCustomAnnoation
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static <T extends Annotation> PropertySupport getCustomAnnoation(JPAModelerScene modelerScene, List<T> annotations, Class<T> annotationType) {
final NAttributeEntity attributeEntity = new NAttributeEntity("Annotations", "Annotations", "");
attributeEntity.setCountDisplay(new String[]{"No Annotations exist", "One Annotation exist", "Annotations exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Annoation", false, String.class));
columns.add(new Column("Location", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new AnnotationPanel(modelerScene.getModelerFile(), annotationType));
attributeEntity.setTableDataListener(new NEntityDataListener<>(annotations,
t -> Arrays.asList(t.isEnable(), t.getName(), t.getLocationType().getTitle()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例13: getCustomArtifact
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getCustomArtifact(JPAModelerScene modelerScene, Set<ReferenceClass> referenceClasses, String artifactType) {
final NAttributeEntity attributeEntity = new NAttributeEntity(artifactType, artifactType, "");
attributeEntity.setCountDisplay(new String[]{String.format("No %s exist", artifactType), String.format("One %s exist", artifactType), String.format("%s exist", artifactType)});
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column(artifactType, false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new JavaClassArtifactPanel(modelerScene.getModelerFile(), artifactType));
attributeEntity.setTableDataListener(new NEntityDataListener<>(referenceClasses,
t -> Arrays.asList(t.isEnable(), t.getName()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例14: getCustomSnippet
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static <T extends Snippet> PropertySupport getCustomSnippet(JPAModelerScene modelerScene, List<T> snippets, Class<T> snippetType) {
final NAttributeEntity attributeEntity = new NAttributeEntity("Snippets", "Snippets", "");
attributeEntity.setCountDisplay(new String[]{"No Snippets exist", "One Snippet exist", "Snippets exist"});
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Snippet", false, String.class));
columns.add(new Column("Location", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new CustomSnippetPanel(modelerScene.getModelerFile(), snippetType));
attributeEntity.setTableDataListener(new NEntityDataListener<>(snippets,
t -> Arrays.asList(t.isEnable(), t.getValue(), t.getLocationType().getTitle()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}
示例15: getNamedNativeQueryProperty
import org.netbeans.modeler.properties.nentity.NAttributeEntity; //导入方法依赖的package包/类
public static PropertySupport getNamedNativeQueryProperty(JPAModelerScene modelerScene, final Entity entity) {
final NAttributeEntity attributeEntity = new NAttributeEntity("NamedNativeQueries", "Named Native Queries", getMessage(PropertiesHandler.class, "INFO_NATIVE_QUERY"));
attributeEntity.setCountDisplay(new String[]{"No Named Native Queries exist", "One Named Native Query exist", "Named Native Queries exist"});
List<NamedNativeQuery> namedNativeQueriesSpec = entity.getNamedNativeQuery();
List<Column> columns = new ArrayList<>();
columns.add(new Column("#", true, Boolean.class));
columns.add(new Column("Name", false, String.class));
columns.add(new Column("Query", false, String.class));
attributeEntity.setColumns(columns);
attributeEntity.setCustomDialog(new NamedNativeQueryPanel(modelerScene.getModelerFile(), entity));
attributeEntity.setTableDataListener(new NEntityDataListener<>(namedNativeQueriesSpec,
t -> Arrays.asList(t.isEnable(), t.getName(), t.getQuery()),
(t, row) -> t.setEnable((boolean) row[1])));
return new NEntityPropertySupport(modelerScene.getModelerFile(), attributeEntity);
}