/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void allowNull() { setIsNullAllowed(true); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void dontAllowNull() { setIsNullAllowed(false); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void dontAllowNull() { setIsNullAllowed(false); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void allowNull() { setIsNullAllowed(true); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void dontAllowNull() { setIsNullAllowed(false); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, the mapping will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then the mapping * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, the mapping will place a NULL in all the * fields in the database row for the aggregate object. * * Note: Any aggregate that has a relationship mapping automatically does not allow * null. */ public void allowNull() { setIsNullAllowed(true); }
/** * 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); }
metaProperty.getAnnotatedElement().getAnnotation(EmbeddedParameters.class); if (embeddedParameters != null && !embeddedParameters.nullAllowed()) ((AggregateObjectMapping) mapping).setIsNullAllowed(false);
aggregateMapping.setIsNullAllowed(true);