public static void bindOneToMany(Element node, OneToMany oneToMany, Mappings mappings) throws MappingException { oneToMany.setReferencedEntityName( getEntityName( node, mappings ) ); String embed = node.attributeValue( "embed-xml" ); oneToMany.setEmbedded( embed == null || "true".equals( embed ) ); String notFound = node.attributeValue( "not-found" ); oneToMany.setIgnoreNotFound( "ignore".equals( notFound ) ); }
public static void bindOneToMany(Element node, OneToMany oneToMany, Mappings mappings) throws MappingException { oneToMany.setReferencedEntityName( getEntityName( node, mappings ) ); String embed = node.attributeValue( "embed-xml" ); oneToMany.setEmbedded( embed == null || "true".equals( embed ) ); String notFound = node.attributeValue( "not-found" ); oneToMany.setIgnoreNotFound( "ignore".equals( notFound ) ); }
public static void bindOneToMany(Element node, OneToMany oneToMany, Mappings mappings) throws MappingException { oneToMany.setReferencedEntityName( getEntityName( node, mappings ) ); String embed = node.attributeValue( "embed-xml" ); oneToMany.setEmbedded( embed == null || "true".equals( embed ) ); String notFound = node.attributeValue( "not-found" ); oneToMany.setIgnoreNotFound( "ignore".equals( notFound ) ); }
public static void bindOneToOne(Element node, OneToOne oneToOne, String path, boolean isNullable, Mappings mappings) throws MappingException { bindColumns( node, oneToOne, isNullable, false, null, mappings ); Attribute constrNode = node.attribute( "constrained" ); boolean constrained = constrNode != null && constrNode.getValue().equals( "true" ); oneToOne.setConstrained( constrained ); oneToOne.setForeignKeyType( constrained ? ForeignKeyDirection.FOREIGN_KEY_FROM_PARENT : ForeignKeyDirection.FOREIGN_KEY_TO_PARENT ); initOuterJoinFetchSetting( node, oneToOne ); initLaziness( node, oneToOne, mappings, true ); oneToOne.setEmbedded( "true".equals( node.attributeValue( "embed-xml" ) ) ); Attribute fkNode = node.attribute( "foreign-key" ); if ( fkNode != null ) oneToOne.setForeignKeyName( fkNode.getValue() ); Attribute ukName = node.attribute( "property-ref" ); if ( ukName != null ) oneToOne.setReferencedPropertyName( ukName.getValue() ); oneToOne.setPropertyName( node.attributeValue( "name" ) ); oneToOne.setReferencedEntityName( getEntityName( node, mappings ) ); validateCascade( node, path ); }