1 21 package oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries; 23 24 import java.util.List ; 25 import java.util.ArrayList ; 26 27 import javax.persistence.FieldResult; 28 import javax.persistence.EntityResult; 29 30 36 public class MetadataEntityResult { 37 protected EntityResult m_entityResult; 38 protected List <MetadataFieldResult> m_fieldResults; 39 40 43 protected MetadataEntityResult() {} 44 45 48 public MetadataEntityResult(EntityResult entityResult) { 49 m_entityResult = entityResult; 50 } 51 52 55 public String getDiscriminatorColumn() { 56 return m_entityResult.discriminatorColumn(); 57 } 58 59 62 public Class getEntityClass() { 63 return m_entityResult.entityClass(); 64 } 65 66 69 public List <MetadataFieldResult> getFieldResults() { 70 if (m_fieldResults == null) { 71 m_fieldResults = new ArrayList <MetadataFieldResult>(); 72 73 for (FieldResult fieldResult : m_entityResult.fields()) { 74 m_fieldResults.add(new MetadataFieldResult(fieldResult)); 75 } 76 } 77 78 return m_fieldResults; 79 } 80 } 81 | Popular Tags |