Best code examples for Hibernate ORM Mappings class (org.hibernate.cfg.Mappings)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Mappings class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM Mappings examples from Open Source projects
This code example shows how to use the following methods: getTypeResolver
	private boolean embedded;
	private boolean ignoreNotFound;
 
	private EntityType getEntityType() {
		return mappings.getTypeResolver().getTypeFactory().manyToOne(
				getReferencedEntityName(), 
				null,  
				false, 
				false, 
				isEmbedded(),
				isIgnoreNotFound(),
				false 
			); 
	} 
 
	public OneToMany(Mappings mappings, PersistentClass owner) throws MappingException {
		this.mappings = mappings;
		this.referencingTable = (owner==null) ? null : owner.getTable();
	} 
 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getTypeResolver
This code example shows how to use the following methods: getTypeResolver
			); 
		} 
		else { 
			return getMappings().getTypeResolver().getTypeFactory().oneToOne(
					getReferencedEntityName(), 
					foreignKeyType, 
					referencedPropertyName,
					isLazy(),
					isUnwrapProxy(),
					isEmbedded(),
					entityName,
					propertyName
			); 
		} 
	} 
 
	public void createForeignKey() throws MappingException {
		if ( constrained && referencedPropertyName==null) {
			//TODO: handle the case of a foreign key to something other than the pk 
			createForeignKeyOfEntity( ( (EntityType) getType() ).getAssociatedEntityName() );
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getTypeResolver
		super( mappings, table );
	} 
 
	public Type getType() throws MappingException {
		return getMappings().getTypeResolver().getTypeFactory().manyToOne(
				getReferencedEntityName(), 
				getReferencedPropertyName(),
				isLazy(),
				isUnwrapProxy(),
				isEmbedded(),
				isIgnoreNotFound(),
				isLogicalOneToOne
		); 
	} 
 
	public void createForeignKey() throws MappingException {
		// the case of a foreign key to something other than the pk is handled in createPropertyRefConstraints 
		if (referencedPropertyName==null && !hasFormula() ) {
			createForeignKeyOfEntity( ( (EntityType) getType() ).getAssociatedEntityName() );
		}  
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getTypeResolver