I would like to read gladly by this interface ClassMetadata the data from a database. However I can only read data of simple PropertyTyp by the method ClassMetadata.getPropertyValue(Object obj, propertyName) and I cannot read data of CollectionTyp.
Please if someone know how to read data of CollectionTyp by the interface ClassMetadata please writes some solutions.
This is the Methode to read the data
public void createRow(Object dao,String names[], ClassMetadata metadata) throws HibernateException
{
for(int j = 0; j < names.length; j++)
{
if(!metadata.getPropertyType(names[j]).isPersistentCollectionType())
{
System.out.println(metadata.getPropertyValue(dao,names[j]));
}
else
{
}
}
}
|