/** * Parse one-to-one. */ protected void parseOneToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "OneToOne"); fmd.setSerialized(false); // override any Lob annotation boolean orphanRemoval = Boolean.valueOf(attrs.getValue( "orphan-removal")); setOrphanRemoval(fmd, orphanRemoval); String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse many-to-one. */ protected void parseManyToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "ManyToOne"); fmd.setSerialized(false); // override any Lob annotation String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse one-to-one. */ protected void parseOneToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "OneToOne"); fmd.setSerialized(false); // override any Lob annotation boolean orphanRemoval = Boolean.valueOf(attrs.getValue( "orphan-removal")); setOrphanRemoval(fmd, orphanRemoval); String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse many-to-one. */ protected void parseManyToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "ManyToOne"); fmd.setSerialized(false); // override any Lob annotation String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse many-to-one. */ protected void parseManyToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "ManyToOne"); fmd.setSerialized(false); // override any Lob annotation String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse many-to-one. */ protected void parseManyToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "ManyToOne"); fmd.setSerialized(false); // override any Lob annotation String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse one-to-one. */ protected void parseOneToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "OneToOne"); fmd.setSerialized(false); // override any Lob annotation boolean orphanRemoval = Boolean.valueOf(attrs.getValue( "orphan-removal")); setOrphanRemoval(fmd, orphanRemoval); String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }
/** * Parse one-to-one. */ protected void parseOneToOne(FieldMetaData fmd, Attributes attrs) throws SAXException { String val = attrs.getValue("fetch"); boolean dfg = (val != null && val.equals("LAZY")) ? false : true; // We need to toggle the DFG explicit flag here because this is used for an optimization when selecting an // Entity with lazy fields. fmd.setDefaultFetchGroupExplicit(true); fmd.setInDefaultFetchGroup(dfg); fmd.setDefaultFetchGroupExplicit(false); val = attrs.getValue("target-entity"); if (val != null) fmd.setTypeOverride(AnnotationPersistenceMetaDataParser.toOverrideType(classForName(val))); assertPC(fmd, "OneToOne"); fmd.setSerialized(false); // override any Lob annotation boolean orphanRemoval = Boolean.valueOf(attrs.getValue( "orphan-removal")); setOrphanRemoval(fmd, orphanRemoval); String mapsId = attrs.getValue("maps-id"); if (mapsId != null) fmd.setMappedByIdValue(mapsId); }