public class ProjectUtil extends Object
| Constructor and Description |
|---|
ProjectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanObjMappings(DataMap map)
Cleans any mappings of ObjEntities, ObjAttributes, ObjRelationship to the
corresponding Db* objects that not longer exist.
|
static void |
clearDbMapping(ObjEntity entity)
Clears all the mapping between this obj entity and its current db entity.
|
static boolean |
containsSourceAttribute(DbRelationship relationship,
DbAttribute attribute)
Returns true if one of relationship joins uses a given attribute as a source.
|
static boolean |
containsTargetAttribute(DbRelationship relationship,
DbAttribute attribute)
Returns true if one of relationship joins uses a given attribute as a target.
|
static Collection<DbRelationship> |
getRelationshipsUsingAttributeAsSource(DbAttribute attribute)
Returns a collection of DbRelationships that use this attribute as a source.
|
static Collection<DbRelationship> |
getRelationshipsUsingAttributeAsTarget(DbAttribute attribute)
Returns a collection of DbRelationships that use this attribute as a source.
|
static void |
setAttributeName(Attribute attribute,
String newName)
Changes the name of the attribute and all references to this attribute.
|
static void |
setDataMapName(DataChannelDescriptor domain,
DataMap map,
String newName) |
static void |
setDataNodeName(DataChannelDescriptor domain,
DataNodeDescriptor node,
String newName) |
static void |
setDbEntityName(DbEntity entity,
String newName)
Renames a DbEntity and changes the name of all references.
|
static void |
setEmbeddableAttributeName(EmbeddableAttribute attribute,
String newName)
Changes the name of the embeddable attribute and all references to this embeddable attribute.
|
static void |
setObjEntityName(DataMap map,
ObjEntity entity,
String newName) |
static void |
setProcedureName(DataMap map,
Procedure procedure,
String newName) |
static void |
setProcedureParameterName(ProcedureParameter parameter,
String newName) |
static void |
setQueryName(DataMap map,
Query query,
String newName) |
static void |
setRelationshipName(Entity entity,
Relationship rel,
String newName)
Changes the name of the attribute in all places in DataMap.
|
public static void setProcedureParameterName(ProcedureParameter parameter, String newName)
public static void setDataMapName(DataChannelDescriptor domain, DataMap map, String newName)
public static void setDataNodeName(DataChannelDescriptor domain, DataNodeDescriptor node, String newName)
public static void setProcedureName(DataMap map, Procedure procedure, String newName)
public static void setDbEntityName(DbEntity entity, String newName)
public static void setAttributeName(Attribute attribute, String newName)
public static void setEmbeddableAttributeName(EmbeddableAttribute attribute, String newName)
public static void setRelationshipName(Entity entity, Relationship rel, String newName)
public static void cleanObjMappings(DataMap map)
public static void clearDbMapping(ObjEntity entity)
public static boolean containsSourceAttribute(DbRelationship relationship, DbAttribute attribute)
public static boolean containsTargetAttribute(DbRelationship relationship, DbAttribute attribute)
public static Collection<DbRelationship> getRelationshipsUsingAttributeAsSource(DbAttribute attribute)
public static Collection<DbRelationship> getRelationshipsUsingAttributeAsTarget(DbAttribute attribute)
Copyright © 2001–2015 Apache Cayenne. All rights reserved.