@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.dictatedSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.defaultSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
@Override public int[] sqlTypes(Mapping mapping) throws MappingException { int[] result = new int[getColumnSpan( mapping )]; int n = 0; for ( Type type : userType.getPropertyTypes() ) { for ( int sqlType : type.sqlTypes( mapping ) ) { result[n++] = sqlType; } } return result; }
@Override public boolean[] toColumnNullness(Object value, Mapping mapping) { boolean[] result = new boolean[getColumnSpan( mapping )]; if ( value == null ) { return result; } Object[] values = getPropertyValues( value, EntityMode.POJO ); //TODO!!!!!!! int loc = 0; Type[] propertyTypes = getSubtypes(); for ( int i = 0; i < propertyTypes.length; i++ ) { boolean[] propertyNullness = propertyTypes[i].toColumnNullness( values[i], mapping ); System.arraycopy( propertyNullness, 0, result, loc, propertyNullness.length ); loc += propertyNullness.length; } return result; }
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[ getColumnSpan( mapping ) ]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.defaultSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[ getColumnSpan( mapping ) ]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.defaultSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[ getColumnSpan( mapping ) ]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.dictatedSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { //Not called at runtime so doesn't matter if its slow :) final Size[] sizes = new Size[ getColumnSpan( mapping ) ]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { final Size[] propertySizes = propertyType.dictatedSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
public int[] sqlTypes(Mapping mapping) throws MappingException { Type[] types = userType.getPropertyTypes(); int[] result = new int[ getColumnSpan(mapping) ]; int n=0; for (int i=0; i<types.length; i++) { int[] sqlTypes = types[i].sqlTypes(mapping); for ( int k=0; k<sqlTypes.length; k++ ) result[n++] = sqlTypes[k]; } return result; }
public int[] sqlTypes(Mapping mapping) throws MappingException { int[] result = new int[ getColumnSpan(mapping) ]; int n=0; for ( Type type : userType.getPropertyTypes() ) { for ( int sqlType : type.sqlTypes( mapping ) ) { result[n++] = sqlType; } } return result; }
public int[] sqlTypes(Mapping mapping) throws MappingException { Type[] types = userType.getPropertyTypes(); int[] result = new int[ getColumnSpan(mapping) ]; int n=0; for (int i=0; i<types.length; i++) { int[] sqlTypes = types[i].sqlTypes(mapping); for ( int k=0; k<sqlTypes.length; k++ ) result[n++] = sqlTypes[k]; } return result; }
public int[] sqlTypes(Mapping mapping) throws MappingException { int[] result = new int[ getColumnSpan(mapping) ]; int n=0; for ( Type type : userType.getPropertyTypes() ) { for ( int sqlType : type.sqlTypes( mapping ) ) { result[n++] = sqlType; } } return result; }
public boolean[] toColumnNullness(Object value, Mapping mapping) { boolean[] result = new boolean[ getColumnSpan(mapping) ]; if (value==null) return result; Object[] values = getPropertyValues(value, EntityMode.POJO); //TODO!!!!!!! int loc = 0; Type[] propertyTypes = getSubtypes(); for ( int i=0; i<propertyTypes.length; i++ ) { boolean[] propertyNullness = propertyTypes[i].toColumnNullness( values[i], mapping ); System.arraycopy(propertyNullness, 0, result, loc, propertyNullness.length); loc += propertyNullness.length; } return result; }
public boolean[] toColumnNullness(Object value, Mapping mapping) { boolean[] result = new boolean[ getColumnSpan(mapping) ]; if (value==null) return result; Object[] values = getPropertyValues(value, EntityMode.POJO); //TODO!!!!!!! int loc = 0; Type[] propertyTypes = getSubtypes(); for ( int i=0; i<propertyTypes.length; i++ ) { boolean[] propertyNullness = propertyTypes[i].toColumnNullness( values[i], mapping ); System.arraycopy(propertyNullness, 0, result, loc, propertyNullness.length); loc += propertyNullness.length; } return result; }
public boolean[] toColumnNullness(Object value, Mapping mapping) { boolean[] result = new boolean[ getColumnSpan(mapping) ]; if (value==null) return result; Object[] values = getPropertyValues(value, EntityMode.POJO); //TODO!!!!!!! int loc = 0; Type[] propertyTypes = getSubtypes(); for ( int i=0; i<propertyTypes.length; i++ ) { boolean[] propertyNullness = propertyTypes[i].toColumnNullness( values[i], mapping ); System.arraycopy(propertyNullness, 0, result, loc, propertyNullness.length); loc += propertyNullness.length; } return result; }