public class EntityResult extends Object
SQLResult
. Note that fields in the EntityResult
are not required to follow the order of columns in the actual query, and can
be added in the arbitrary order.Modifier and Type | Field and Description |
---|---|
protected Class<?> |
entityClass |
protected String |
entityName |
protected Collection<org.apache.cayenne.map.EntityResult.FieldResult> |
fields |
Constructor and Description |
---|
EntityResult(Class<?> entityClass) |
EntityResult(String entityName) |
Modifier and Type | Method and Description |
---|---|
void |
addDbField(String dbAttributeName,
String column)
Adds a result set column mapping for a single DbAttribute.
|
void |
addObjectField(String attributeName,
String column)
Adds a result set column mapping for a single object property of the root
entity.
|
void |
addObjectField(String entityName,
String attributeName,
String column)
Adds a result set column mapping for a single object property of a
specified entity that may differ from the root entity if inheritance is
involved.
|
Map<String,String> |
getDbFields(EntityResolver resolver)
Returns a map of result column names to attribute db paths from the root
entity.
|
Class<?> |
getEntityClass() |
String |
getEntityName() |
protected String entityName
protected Class<?> entityClass
protected Collection<org.apache.cayenne.map.EntityResult.FieldResult> fields
public EntityResult(Class<?> entityClass)
public EntityResult(String entityName)
public Map<String,String> getDbFields(EntityResolver resolver)
public void addObjectField(String attributeName, String column)
public void addObjectField(String entityName, String attributeName, String column)
public void addDbField(String dbAttributeName, String column)
public String getEntityName()
public Class<?> getEntityClass()
Copyright © 2001–2019 Apache Cayenne. All rights reserved.