Code example for Type

Methods: isCollectionTypeisComponentType

	 * @return The appropriate IdentifierProperty definition. 
	public static IdentifierProperty buildIdentifierProperty(EntityBinding mappedEntity, IdentifierGenerator generator) {
		final BasicAttributeBinding property = mappedEntity.getHierarchyDetails().getEntityIdentifier().getValueBinding();
		// TODO: the following will cause an NPE with "virtual" IDs; how should they be set? 
		// (steve) virtual attributes will still be attributes, they will simply be marked as virtual. 
		//		see org.hibernate.metamodel.domain.AbstractAttributeContainer.locateOrCreateVirtualAttribute() 
		final String mappedUnsavedValue = property.getUnsavedValue();
		final Type type = property.getHibernateTypeDescriptor().getResolvedTypeMapping();
		IdentifierValue unsavedValue = UnsavedValueFactory.getUnsavedIdentifierValue(
				getGetter( property ),
				getConstructor( mappedEntity )
Experience pair programming with AI  Get Codota for Java