use of org.hibernate.engine.jdbc.Size in project hibernate-orm by hibernate.
the class CompositeCustomType method defaultSizes.
@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;
}
use of org.hibernate.engine.jdbc.Size in project hibernate-orm by hibernate.
the class CompositeCustomType method dictatedSizes.
@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;
}
Aggregations