本文整理汇总了Java中org.netbeans.jpa.modeler.spec.CollectionTable类的典型用法代码示例。如果您正苦于以下问题:Java CollectionTable类的具体用法?Java CollectionTable怎么用?Java CollectionTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CollectionTable类属于org.netbeans.jpa.modeler.spec包,在下文中一共展示了CollectionTable类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCollectionTable
import org.netbeans.jpa.modeler.spec.CollectionTable; //导入依赖的package包/类
protected CollectionTableSnippet getCollectionTable(CollectionTable parsedCollectionTable) {
if (parsedCollectionTable == null || CollectionTableValidator.isEmpty(parsedCollectionTable)) {
return null;
}
List<JoinColumnSnippet> joinColumns = getJoinColumns(
parsedCollectionTable.getJoinColumn(), false);
Set<UniqueConstraint> parsedUniqueConstraints = parsedCollectionTable.getUniqueConstraint();
List<UniqueConstraintSnippet> uniqueConstraints = getUniqueConstraints(parsedUniqueConstraints);
CollectionTableSnippet collectionTable = new CollectionTableSnippet();
collectionTable.setCatalog(parsedCollectionTable.getCatalog());
collectionTable.setName(parsedCollectionTable.getName());
collectionTable.setSchema(parsedCollectionTable.getSchema());
collectionTable.setJoinColumns(joinColumns);
collectionTable.setUniqueConstraints(uniqueConstraints);
collectionTable.setIndices(getIndexes(parsedCollectionTable.getIndex()));
collectionTable.setForeignKey(getForeignKey(parsedCollectionTable.getForeignKey()));
return collectionTable;
}
示例2: getCollectionTable
import org.netbeans.jpa.modeler.spec.CollectionTable; //导入依赖的package包/类
protected CollectionTableSnippet getCollectionTable(CollectionTable parsedCollectionTable) {
if (parsedCollectionTable == null) {
return null;
}
List<JoinColumnSnippet> joinColumns = getJoinColumns(
parsedCollectionTable.getJoinColumn());
List<UniqueConstraint> parsedUniqueConstraints
= parsedCollectionTable.getUniqueConstraint();
UniqueConstraintSnippet uniqueConstraints = getUniqueConstraint(
parsedUniqueConstraints);
CollectionTableSnippet collectionTable = new CollectionTableSnippet();
collectionTable.setCatalog(parsedCollectionTable.getCatalog());
collectionTable.setName(parsedCollectionTable.getName());
collectionTable.setSchema(parsedCollectionTable.getSchema());
collectionTable.setJoinColumns(joinColumns);
collectionTable.setUniqueConstraints(uniqueConstraints);
return collectionTable;
}
示例3: marshal
import org.netbeans.jpa.modeler.spec.CollectionTable; //导入依赖的package包/类
@Override
public CollectionTable marshal(CollectionTable table) throws Exception {
if (table != null && isEmpty(table)) {
return null;
}
return table;
}
示例4: isEmpty
import org.netbeans.jpa.modeler.spec.CollectionTable; //导入依赖的package包/类
public static boolean isEmpty(CollectionTable table) {
JoinColumnValidator.filter(table.getJoinColumn());
return StringUtils.isBlank(table.getName()) && StringUtils.isBlank(table.getSchema()) &&
StringUtils.isBlank(table.getCatalog())
&& table.getJoinColumn().isEmpty() && table.getIndex().isEmpty();
}
示例5: createPropertySet
import org.netbeans.jpa.modeler.spec.CollectionTable; //导入依赖的package包/类
@Override
public void createPropertySet(ElementPropertySet set) {
super.createPropertySet(set);
ElementCollection attribute = this.getBaseElementSpec().getAttribute();
CollectionTable collectionTable = attribute.getCollectionTable();
set.createPropertySet(this, collectionTable, getPropertyChangeListeners());
set.createPropertySet("FOREIGN_KEY", this, collectionTable.getForeignKey() , null);
}