/** * Return a new aggregate/embedded mapping for this type of descriptor. */ public AggregateMapping newAggregateMapping() { return new AggregateObjectMapping(); }
/** * Return a new aggregate/embedded mapping for this type of descriptor. */ public AggregateMapping newAggregateMapping() { return new AggregateObjectMapping(); }
/** * Add a {@link AggregateObjectMapping} ({@link Embeddable} in JPA) to the * {@link #entityType} being built or extended. * * @param name * attribute name to use in the dynamic entity. Also the property * name used to access the state of the entity * @param refType * dynamic type re[presenting the Embeddable/AggregateObject * @param allowsNull * true indicates that the attribute can be null if all values * are null. * @return the new mapping configured and initialized (if the descriptor has * been initialized). */ public AggregateObjectMapping addAggregateObjectMapping(String name, DynamicType refType, boolean allowsNull) { AggregateObjectMapping mapping = new AggregateObjectMapping(); mapping.setAttributeName(name); mapping.setReferenceClass(refType.getJavaClass()); mapping.setIsNullAllowed(allowsNull); return (AggregateObjectMapping) addMapping(mapping); }
/** * Add a {@link AggregateObjectMapping} ({@link Embeddable} in JPA) to the * {@link #entityType} being built or extended. * * @param name * attribute name to use in the dynamic entity. Also the property * name used to access the state of the entity * @param refType * dynamic type re[presenting the Embeddable/AggregateObject * @param allowsNull * true indicates that the attribute can be null if all values * are null. * @return the new mapping configured and initialized (if the descriptor has * been initialized). */ public AggregateObjectMapping addAggregateObjectMapping(String name, DynamicType refType, boolean allowsNull) { AggregateObjectMapping mapping = new AggregateObjectMapping(); mapping.setAttributeName(name); mapping.setReferenceClass(refType.getJavaClass()); mapping.setIsNullAllowed(allowsNull); return (AggregateObjectMapping) addMapping(mapping); }
/** * Add a {@link AggregateObjectMapping} ({@link Embeddable} in JPA) to the * {@link #entityType} being built or extended. * * @param name * attribute name to use in the dynamic entity. Also the property * name used to access the state of the entity * @param refType * dynamic type re[presenting the Embeddable/AggregateObject * @param allowsNull * true indicates that the attribute can be null if all values * are null. * @return the new mapping configured and initialized (if the descriptor has * been initialized). */ public AggregateObjectMapping addAggregateObjectMapping(String name, DynamicType refType, boolean allowsNull) { AggregateObjectMapping mapping = new AggregateObjectMapping(); mapping.setAttributeName(name); mapping.setReferenceClass(refType.getJavaClass()); mapping.setIsNullAllowed(allowsNull); return (AggregateObjectMapping) addMapping(mapping); }
AggregateObjectMapping keyMapping = new AggregateObjectMapping(); MetadataClass mapKeyClass = mappedKeyMapAccessor.getMapKeyClass(); keyMapping.setReferenceClassName(mapKeyClass.getName());