ad.setValue( "optional", oneToOne.optional() ); ad.setValue( "mappedBy", oneToOne.mappedBy() ); ad.setValue( "orphanRemoval", oneToOne.orphanRemoval() );
private void readOneToOne(OneToOne propAnn, DeployBeanPropertyAssocOne<?> prop) { prop.setOneToOne(); prop.setDbInsertable(true); prop.setDbUpdateable(true); prop.setNullable(propAnn.optional()); prop.setFetchType(propAnn.fetch()); prop.setMappedBy(propAnn.mappedBy()); if (!"".equals(propAnn.mappedBy())) { prop.setOneToOneExported(); prop.setOrphanRemoval(propAnn.orphanRemoval()); } else if (propAnn.orphanRemoval()) { prop.setOrphanRemoval(true); } setCascadeTypes(propAnn.cascade(), prop.getCascadeInfo()); prop.setBeanTable(beanTable(prop)); }
getCascadeStrategy( ann.cascade(), hibernateCascade, ann.orphanRemoval(), forcePersist ), joinColumns, !mandatory,
ad.setValue( "optional", oneToOne.optional() ); ad.setValue( "mappedBy", oneToOne.mappedBy() ); ad.setValue( "orphanRemoval", oneToOne.orphanRemoval() );
this.removesOprhans = oneToOne.orphanRemoval(); this.mapsId = this.handleMapsId(member, parsed); this.id = this.handleId(member, parsed);
this.removesOprhans = oneToOne.orphanRemoval(); this.mapsId = this.handleMapsId(member, parsed); this.id = this.handleId(member, parsed);
this.removesOprhans = oneToOne.orphanRemoval(); this.mapsId = this.handleMapsId(member, parsed); this.id = this.handleId(member, parsed);
private void readOneToOne(OneToOne propAnn, DeployBeanPropertyAssocOne<?> prop) { prop.setOneToOne(); prop.setDbInsertable(true); prop.setDbUpdateable(true); prop.setNullable(propAnn.optional()); prop.setFetchType(propAnn.fetch()); prop.setMappedBy(propAnn.mappedBy()); if (!"".equals(propAnn.mappedBy())) { prop.setOneToOneExported(); prop.setOrphanRemoval(propAnn.orphanRemoval()); } else if (propAnn.orphanRemoval()) { prop.setOrphanRemoval(true); } setCascadeTypes(propAnn.cascade(), prop.getCascadeInfo()); prop.setBeanTable(beanTable(prop)); }
getCascadeStrategy( ann.cascade(), hibernateCascade, ann.orphanRemoval(), forcePersist ), joinColumns, !mandatory,
/** * Parse @OneToOne. */ private void parseOneToOne(FieldMetaData fmd, OneToOne anno) { if (!JavaTypes.maybePC(fmd.getValue())) throw new MetaDataException(_loc.get("bad-meta-anno", fmd, "OneToOne")); // don't specifically exclude relation from DFG b/c that will prevent // us from even reading the fk when reading from the primary table, // which is not what most users will want if (anno.fetch() == FetchType.EAGER) fmd.setInDefaultFetchGroup(true); if (!anno.optional()) fmd.setNullValue(FieldMetaData.NULL_EXCEPTION); if (isMappingOverrideMode() && !StringUtils.isEmpty(anno.mappedBy())) fmd.setMappedBy(anno.mappedBy()); if (anno.targetEntity() != void.class) fmd.setTypeOverride(anno.targetEntity()); setCascades(fmd, anno.cascade()); setOrphanRemoval(fmd, anno.orphanRemoval()); fmd.setAssociationType(FieldMetaData.ONE_TO_ONE); }
/** * Parse @OneToOne. */ private void parseOneToOne(FieldMetaData fmd, OneToOne anno) { if (!JavaTypes.maybePC(fmd.getValue())) throw new MetaDataException(_loc.get("bad-meta-anno", fmd, "OneToOne")); // don't specifically exclude relation from DFG b/c that will prevent // us from even reading the fk when reading from the primary table, // which is not what most users will want if (anno.fetch() == FetchType.EAGER) fmd.setInDefaultFetchGroup(true); if (!anno.optional()) fmd.setNullValue(FieldMetaData.NULL_EXCEPTION); if (isMappingOverrideMode() && !StringUtils.isEmpty(anno.mappedBy())) fmd.setMappedBy(anno.mappedBy()); if (anno.targetEntity() != void.class) fmd.setTypeOverride(anno.targetEntity()); setCascades(fmd, anno.cascade()); setOrphanRemoval(fmd, anno.orphanRemoval()); fmd.setAssociationType(FieldMetaData.ONE_TO_ONE); }
/** * Parse @OneToOne. */ private void parseOneToOne(FieldMetaData fmd, OneToOne anno) { if (!JavaTypes.maybePC(fmd.getValue())) throw new MetaDataException(_loc.get("bad-meta-anno", fmd, "OneToOne")); // don't specifically exclude relation from DFG b/c that will prevent // us from even reading the fk when reading from the primary table, // which is not what most users will want if (anno.fetch() == FetchType.EAGER) fmd.setInDefaultFetchGroup(true); if (!anno.optional()) fmd.setNullValue(FieldMetaData.NULL_EXCEPTION); if (isMappingOverrideMode() && !StringUtil.isEmpty(anno.mappedBy())) fmd.setMappedBy(anno.mappedBy()); if (anno.targetEntity() != void.class) fmd.setTypeOverride(anno.targetEntity()); setCascades(fmd, anno.cascade()); setOrphanRemoval(fmd, anno.orphanRemoval()); fmd.setAssociationType(FieldMetaData.ONE_TO_ONE); }
/** * Parse @OneToOne. */ private void parseOneToOne(FieldMetaData fmd, OneToOne anno) { if (!JavaTypes.maybePC(fmd.getValue())) throw new MetaDataException(_loc.get("bad-meta-anno", fmd, "OneToOne")); // don't specifically exclude relation from DFG b/c that will prevent // us from even reading the fk when reading from the primary table, // which is not what most users will want if (anno.fetch() == FetchType.EAGER) fmd.setInDefaultFetchGroup(true); if (!anno.optional()) fmd.setNullValue(FieldMetaData.NULL_EXCEPTION); if (isMappingOverrideMode() && !StringUtil.isEmpty(anno.mappedBy())) fmd.setMappedBy(anno.mappedBy()); if (anno.targetEntity() != void.class) fmd.setTypeOverride(anno.targetEntity()); setCascades(fmd, anno.cascade()); setOrphanRemoval(fmd, anno.orphanRemoval()); fmd.setAssociationType(FieldMetaData.ONE_TO_ONE); }
getCascadeStrategy( ann.cascade(), hibernateCascade, ann.orphanRemoval(), forcePersist ), joinColumns, !mandatory,
getCascadeStrategy( ann.cascade(), hibernateCascade, ann.orphanRemoval(), forcePersist ), joinColumns, !mandatory,
getCascadeStrategy( ann.cascade(), hibernateCascade, ann.orphanRemoval(), forcePersist ), joinColumns, !mandatory,