Hibernate ORM MetaAttribute - 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 MetaAttribute class.

This code example shows how to use the following methods: addValue, getName
 
		assertEquals( null, c2j.getPOJOClass(base).getExtends() );
		assertEquals( "Base", c2j.getPOJOClass(sub).getExtends() );
 
		Map m = new HashMap();
		MetaAttribute attribute = new MetaAttribute( "extends" );
		attribute.addValue( "x" );
		attribute.addValue( "y" );
		m.put( attribute.getName(), attribute );
		attribute = new MetaAttribute( "interface" );
		attribute.addValue( "true" );
		m.put( attribute.getName(), attribute );
 
		sub.setMetaAttributes( m );
		assertEquals( "Base,x,y", c2j.getPOJOClass(sub).getExtends() );
 
		m = new HashMap();
		attribute = new MetaAttribute( "implements" );
		attribute.addValue( "intf" );
		m.put( attribute.getName(), attribute );
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
		 
		org.hibernate.mapping.Component component = (Component)property.getValue();
		property = component.getProperty( "x" );
		propertyAttribute = property.getMetaAttribute( "globalmutated" );
		 
		assertNotNull(propertyAttribute);
		/*assertEquals( propertyAttribute.getValues().size(), 4 ); 
		assertEquals( "top level", propertyAttribute.getValues().get(0) ); 
		assertEquals( "wicked level", propertyAttribute.getValues().get(1) ); 
		assertEquals( "monetaryamount level", propertyAttribute.getValues().get(2) );*/ 
		assertEquals( "monetaryamount x level", propertyAttribute.getValue() );
		 
		property = cm.getProperty( "sortedEmployee" );
		propertyAttribute = property.getMetaAttribute( "globalmutated" );
		 
		assertNotNull(propertyAttribute);
		/*assertEquals( propertyAttribute.getValues().size(), 3 ); 
		assertEquals( "top level", propertyAttribute.getValues().get(0) ); 
		assertEquals( "wicked level", propertyAttribute.getValues().get(1) );*/ 
		assertEquals( "sortedemployee level", propertyAttribute.getValue() );
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE