public void copyTypeFrom( SimpleValue sourceValue ) { setTypeName( sourceValue.getTypeName() ); setTypeParameters( sourceValue.getTypeParameters() ); type = sourceValue.type; attributeConverterDescriptor = sourceValue.attributeConverterDescriptor; }
private static void bindSimpleValueType( MappingDocument mappingDocument, HibernateTypeSource typeSource, SimpleValue simpleValue) { if ( mappingDocument.getBuildingOptions().useNationalizedCharacterData() ) { simpleValue.makeNationalized(); } final TypeResolution typeResolution = resolveType( mappingDocument, typeSource ); if ( typeResolution == null ) { // no explicit type info was found return; } if ( CollectionHelper.isNotEmpty( typeResolution.parameters ) ) { simpleValue.setTypeParameters( typeResolution.parameters ); } if ( typeResolution.typeName != null ) { simpleValue.setTypeName( typeResolution.typeName ); } }
simpleValue.setTypeParameters( typeDef.getParametersAsProperties() ); simpleValue.setTypeParameters( typeParameters ); parameters.put( DynamicParameterizedType.PROPERTY, xproperty.getName() ); parameters.put( DynamicParameterizedType.ACCESS_TYPE, accessType.getType() ); simpleValue.setTypeParameters( parameters );
final SimpleValue referencedValue = (SimpleValue) referencedProperty.getValue(); value.setTypeName( referencedValue.getTypeName() ); value.setTypeParameters( referencedValue.getTypeParameters() ); final Iterator<Selectable> columns = referencedValue.getColumnIterator();
public void fillSimpleValue() { log.debug( "setting SimpleValue typeName for {}", propertyName ); String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion()) { simpleValue.setTypeName( "integer" ); } }
targetValue = new SimpleValue( collection.getCollectionTable() ); targetValue.setTypeName( sourceValue.getTypeName() ); targetValue.setTypeParameters( sourceValue.getTypeParameters() );
final SimpleValue referencedValue = (SimpleValue) referencedProperty.getValue(); value.setTypeName( referencedValue.getTypeName() ); value.setTypeParameters( referencedValue.getTypeParameters() ); final Iterator<Column> columns = referencedValue.getColumnIterator();
public void copyTypeFrom( SimpleValue sourceValue ) { setExplicitTypeName( sourceValue.getTypeName() ); setTypeParameters( sourceValue.getTypeParameters() ); }
public SimpleValue fillSimpleValue(SimpleValue simpleValue) { String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } for ( Ejb3Column column : columns ) { column.linkWithValue( simpleValue ); } return simpleValue; } }
private static void bindSimpleValueType(Element node, SimpleValue simpleValue, Mappings mappings) throws MappingException { String typeName = null; Properties parameters = new Properties(); Attribute typeNode = node.attribute( "type" ); if ( typeNode == null ) typeNode = node.attribute( "id-type" ); // for an any if ( typeNode != null ) typeName = typeNode.getValue(); Element typeChild = node.element( "type" ); if ( typeName == null && typeChild != null ) { typeName = typeChild.attribute( "name" ).getValue(); Iterator typeParameters = typeChild.elementIterator( "param" ); while ( typeParameters.hasNext() ) { Element paramElement = (Element) typeParameters.next(); parameters.setProperty( paramElement.attributeValue( "name" ), paramElement .getTextTrim() ); } } TypeDef typeDef = mappings.getTypeDef( typeName ); if ( typeDef != null ) { typeName = typeDef.getTypeClass(); // parameters on the property mapping should // override parameters in the typedef Properties allParameters = new Properties(); allParameters.putAll( typeDef.getParameters() ); allParameters.putAll( parameters ); parameters = allParameters; } if ( !parameters.isEmpty() ) simpleValue.setTypeParameters( parameters ); if ( typeName != null ) simpleValue.setTypeName( typeName ); }
if ( !parameters.isEmpty() ) simpleValue.setTypeParameters( parameters );
if ( !parameters.isEmpty() ) simpleValue.setTypeParameters( parameters );
if ( !parameters.isEmpty() ) simpleValue.setTypeParameters( parameters );
private static void setTypeForPropertyConfig(GrailsDomainClassProperty grailsProp, SimpleValue simpleValue, PropertyConfig config) { final String typeName = getTypeName(grailsProp, getPropertyConfig(grailsProp), getMapping(grailsProp.getDomainClass())); if (typeName == null) { simpleValue.setTypeName(grailsProp.getType().getName()); } else { simpleValue.setTypeName(typeName); if (config != null) { simpleValue.setTypeParameters(config.getTypeParams()); } } }
protected void setTypeForPropertyConfig(PersistentProperty grailsProp, SimpleValue simpleValue, PropertyConfig config) { final String typeName = getTypeName(grailsProp, getPropertyConfig(grailsProp), getMapping(grailsProp.getOwner())); if (typeName == null) { simpleValue.setTypeName(grailsProp.getType().getName()); } else { simpleValue.setTypeName(typeName); if (config != null) { simpleValue.setTypeParameters(config.getTypeParams()); } } }
public void fillSimpleValue() { LOG.debugf( "Setting SimpleValue typeName for %s", propertyName ); String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion() ) { simpleValue.setTypeName( "integer" ); } // HHH-5205 if ( timeStampVersionType != null ) { simpleValue.setTypeName( timeStampVersionType ); } }
public void fillSimpleValue() { LOG.debugf( "Setting SimpleValue typeName for %s", propertyName ); String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion() ) { simpleValue.setTypeName( "integer" ); } // HHH-5205 if ( timeStampVersionType != null ) { simpleValue.setTypeName( timeStampVersionType ); } }
simpleValue.setTypeParameters(enumProperties);
simpleValue.setTypeParameters(enumProperties);
value.setTypeName(typeName); if(typeParams != null) { value.setTypeParameters(typeParams);