/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmConfNode")
public Set<BpmConfNotice> getBpmConfNotices() {
return this.bpmConfNotices;
}
java类javax.persistence.OneToMany的实例源码
BpmConfNode.java 文件源码
项目:lemon
阅读 22
收藏 0
点赞 0
评论 0
BpmConfNode.java 文件源码
项目:lemon
阅读 27
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmConfNode")
public Set<BpmConfUser> getBpmConfUsers() {
return this.bpmConfUsers;
}
Vendor.java 文件源码
项目:tap17-muggl-javaee
阅读 26
收藏 0
点赞 0
评论 0
@OneToMany(cascade=ALL, mappedBy="vendor")
public Collection<VendorPart> getVendorParts() {
return vendorParts;
}
OfficesupplyInfo.java 文件源码
项目:lemon
阅读 26
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "officesupplyInfo")
public Set<OfficesupplyReceive> getOfficesupplyReceives() {
return this.officesupplyReceives;
}
PimSchedule.java 文件源码
项目:lemon
阅读 31
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pimSchedule")
public Set<PimScheduleParticipant> getPimScheduleParticipants() {
return this.pimScheduleParticipants;
}
CmsArticle.java 文件源码
项目:lemon
阅读 26
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "cmsArticle")
public Set<CmsClick> getCmsClicks() {
return this.cmsClicks;
}
BpmConfNode.java 文件源码
项目:lemon
阅读 22
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmConfNode")
public Set<BpmConfOperation> getBpmConfOperations() {
return this.bpmConfOperations;
}
CollectionBinder.java 文件源码
项目:lams
阅读 27
收藏 0
点赞 0
评论 0
protected void bindOneToManySecondPass(
Collection collection,
Map persistentClasses,
Ejb3JoinColumn[] fkJoinColumns,
XClass collectionType,
boolean cascadeDeleteEnabled,
boolean ignoreNotFound,
Mappings mappings,
Map<XClass, InheritanceState> inheritanceStatePerClass) {
final boolean debugEnabled = LOG.isDebugEnabled();
if ( debugEnabled ) {
LOG.debugf( "Binding a OneToMany: %s.%s through a foreign key", propertyHolder.getEntityName(), propertyName );
}
org.hibernate.mapping.OneToMany oneToMany = new org.hibernate.mapping.OneToMany( mappings, collection.getOwner() );
collection.setElement( oneToMany );
oneToMany.setReferencedEntityName( collectionType.getName() );
oneToMany.setIgnoreNotFound( ignoreNotFound );
String assocClass = oneToMany.getReferencedEntityName();
PersistentClass associatedClass = (PersistentClass) persistentClasses.get( assocClass );
if ( jpaOrderBy != null ) {
final String orderByFragment = buildOrderByClauseFromHql(
jpaOrderBy.value(),
associatedClass,
collection.getRole()
);
if ( StringHelper.isNotEmpty( orderByFragment ) ) {
collection.setOrderBy( orderByFragment );
}
}
if ( mappings == null ) {
throw new AssertionFailure(
"CollectionSecondPass for oneToMany should not be called with null mappings"
);
}
Map<String, Join> joins = mappings.getJoins( assocClass );
if ( associatedClass == null ) {
throw new MappingException(
"Association references unmapped class: " + assocClass
);
}
oneToMany.setAssociatedClass( associatedClass );
for (Ejb3JoinColumn column : fkJoinColumns) {
column.setPersistentClass( associatedClass, joins, inheritanceStatePerClass );
column.setJoins( joins );
collection.setCollectionTable( column.getTable() );
}
if ( debugEnabled ) {
LOG.debugf( "Mapping collection: %s -> %s", collection.getRole(), collection.getCollectionTable().getName() );
}
bindFilters( false );
bindCollectionSecondPass( collection, null, fkJoinColumns, cascadeDeleteEnabled, property, mappings );
if ( !collection.isInverse()
&& !collection.getKey().isNullable() ) {
// for non-inverse one-to-many, with a not-null fk, add a backref!
String entityName = oneToMany.getReferencedEntityName();
PersistentClass referenced = mappings.getClass( entityName );
Backref prop = new Backref();
prop.setName( '_' + fkJoinColumns[0].getPropertyName() + '_' + fkJoinColumns[0].getLogicalColumnName() + "Backref" );
prop.setUpdateable( false );
prop.setSelectable( false );
prop.setCollectionRole( collection.getRole() );
prop.setEntityName( collection.getOwner().getEntityName() );
prop.setValue( collection.getKey() );
referenced.addProperty( prop );
}
}
BpmMailTemplate.java 文件源码
项目:lemon
阅读 24
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmMailTemplate")
public Set<BpmConfNotice> getBpmConfNotices() {
return this.bpmConfNotices;
}
BpmConfBase.java 文件源码
项目:lemon
阅读 26
收藏 0
点赞 0
评论 0
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmConfBase")
public Set<BpmConfNode> getBpmConfNodes() {
return this.bpmConfNodes;
}