List of usage examples for org.hibernate.mapping SimpleValue isSimpleValue
public boolean isSimpleValue()
From source file:com.oy.shared.lm.ext.HBMCtoGRAPH.java
License:Open Source License
private Attribute addSimpleProp(SimpleValue val, String name) { if (!val.isSimpleValue()) { throw new RuntimeException("Expected SimpleValue."); }// w w w. jav a2 s .c o m Attribute attr = new Attribute(); attr.name = name; if (attr.name == null) { Iterator iter = val.getColumnIterator(); while (iter.hasNext()) { Column col = (Column) iter.next(); attr.name = col.getName(); break; } } if (val instanceof Component) { attr.type = ((Component) val).getComponentClassName(); } else { attr.type = val.getType().getName(); } return attr; }