Hibernate ORM ClassMetadata - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ClassMetadata class.

This code example shows how to use the following methods: getIdentifier
		final ClassMetadata cmd = sf.getClassMetadata(entityClass);
 
		final SessionImplementor si = (SessionImplementor)(getEntityManager().getDelegate());
 
		@SuppressWarnings("unchecked") 
		final ID result = (ID) cmd.getIdentifier(entity, si);
		return result;
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public T persist(T entity) {
 
		// Case of new, non-persisted entity 
		if (extractId(entity) == null) {
			getEntityManager().persist(entity);
		} 
	 
		else if (!getEntityManager().contains(entity)) {
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM ClassMetadata Methods: