本文整理匯總了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);
}