org.hibernate.engine.jdbc.Size Java Examples
The following examples show how to use
org.hibernate.engine.jdbc.Size.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompositeCustomType.java From lams with GNU General Public License v2.0 | 5 votes |
@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; }
Example #2
Source File: CompositeCustomType.java From lams with GNU General Public License v2.0 | 5 votes |
@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; }
Example #3
Source File: ComponentType.java From lams with GNU General Public License v2.0 | 5 votes |
@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 : propertyTypes ) { final Size[] propertySizes = propertyType.dictatedSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
Example #4
Source File: ComponentType.java From lams with GNU General Public License v2.0 | 5 votes |
@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 : propertyTypes ) { final Size[] propertySizes = propertyType.defaultSizes( mapping ); System.arraycopy( propertySizes, 0, sizes, soFar, propertySizes.length ); soFar += propertySizes.length; } return sizes; }
Example #5
Source File: CustomType.java From lams with GNU General Public License v2.0 | 5 votes |
public CustomType(UserType userType, String[] registrationKeys) throws MappingException { this.userType = userType; this.name = userType.getClass().getName(); this.types = userType.sqlTypes(); this.dictatedSizes = Sized.class.isInstance( userType ) ? ( (Sized) userType ).dictatedSizes() : new Size[ types.length ]; this.defaultSizes = Sized.class.isInstance( userType ) ? ( (Sized) userType ).defaultSizes() : new Size[ types.length ]; this.customLogging = LoggableUserType.class.isInstance( userType ); this.registrationKeys = registrationKeys; }
Example #6
Source File: MetaType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return baseType.defaultSizes( mapping ); }
Example #7
Source File: OneToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return SIZES; }
Example #8
Source File: AnyType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return ArrayHelper.join( discriminatorType.dictatedSizes( mapping ), identifierType.dictatedSizes( mapping ) ); }
Example #9
Source File: AnyType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return ArrayHelper.join( discriminatorType.defaultSizes( mapping ), identifierType.defaultSizes( mapping ) ); }
Example #10
Source File: CollectionType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return new Size[] { LEGACY_DICTATED_SIZE }; }
Example #11
Source File: CollectionType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return new Size[] { LEGACY_DEFAULT_SIZE }; }
Example #12
Source File: MetaType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return baseType.dictatedSizes( mapping ); }
Example #13
Source File: ManyToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return requireIdentifierOrUniqueKeyType( mapping ).dictatedSizes( mapping ); }
Example #14
Source File: ImmutableType.java From hibernate-types with Apache License 2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return new Size[]{new Size()}; }
Example #15
Source File: ImmutableType.java From hibernate-types with Apache License 2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return dictatedSizes(mapping); }
Example #16
Source File: ImmutableType.java From hibernate-types with Apache License 2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return new Size[]{new Size()}; }
Example #17
Source File: ImmutableType.java From hibernate-types with Apache License 2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return dictatedSizes(mapping); }
Example #18
Source File: ColumnMapperSingleColumnTypeAdapter.java From jadira with Apache License 2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return columnMapper.getHibernateType().dictatedSizes(mapping); }
Example #19
Source File: ColumnMapperSingleColumnTypeAdapter.java From jadira with Apache License 2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return columnMapper.getHibernateType().defaultSizes(mapping); }
Example #20
Source File: OneToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return SIZES; }
Example #21
Source File: ManyToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return requireIdentifierOrUniqueKeyType( mapping ).defaultSizes( mapping ); }
Example #22
Source File: AbstractStandardBasicType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return new Size[] { getDefaultSize() }; }
Example #23
Source File: AbstractStandardBasicType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return new Size[] { getDictatedSize() }; }
Example #24
Source File: AbstractStandardBasicType.java From lams with GNU General Public License v2.0 | 4 votes |
protected Size getDictatedSize() { return dictatedSize; }
Example #25
Source File: AbstractStandardBasicType.java From lams with GNU General Public License v2.0 | 4 votes |
protected static Size getDefaultSize() { return DEFAULT_SIZE; }
Example #26
Source File: CustomType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return defaultSizes; }
Example #27
Source File: CustomType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return dictatedSizes; }
Example #28
Source File: SpecialOneToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return super.getIdentifierOrUniqueKeyType( mapping ).defaultSizes( mapping ); }
Example #29
Source File: SpecialOneToOneType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { return super.getIdentifierOrUniqueKeyType( mapping ).dictatedSizes( mapping ); }
Example #30
Source File: DiscriminatorType.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Size[] defaultSizes(Mapping mapping) throws MappingException { return underlyingType.defaultSizes( mapping ); }