|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.dbmain.jidbm.Mapping
public class Mapping
The Mapping class manage the "MappingOID" user-defined property, for finding objects sharing the same "MappingOID" values.
| Field Summary | |
|---|---|
static java.lang.String |
MP_MAPPING_OID
|
| Constructor Summary | |
|---|---|
Mapping(DBMSchema sch1,
DBMSchema sch2)
Simplified constructor: all the components (collections, entity types, relationship types, attributes, roles, groups, processing units) of the two schemas will be taken |
|
Mapping(DBMSchema sch1,
DBMSchema sch2,
DBMSchema sch3)
Simplified constructor: all the components (collections, entity types, relationship types, attributes, roles, groups, processing units) of the three schemas will be taken |
|
Mapping(DBMSchema sch1,
DBMSchema sch2,
DBMSchema sch3,
DBMSchema sch4)
Simplified constructor: all the components (collections, entity types, relationship types, attributes, roles, groups, processing units) of the four schemas will be taken |
|
Mapping(java.util.LinkedList<java.util.LinkedList<DBMGenericObject>> schl)
Constructors initializes the MappingOID analysis structures. |
|
Mapping(java.util.Vector<DBMSchema> lsch)
Simplified constructor: all the components (collections, entity types, relationship types, attributes, roles, groups, processing units) of the schemas from a list will be taken |
|
| Method Summary | |
|---|---|
static void |
addUnique(java.util.List<java.lang.Integer> masterOid,
java.util.List<java.lang.Integer> slaveOid)
Adds to 'masterOid' the elements of 'slaveOid' that are not presents in 'masterOid' |
static boolean |
areMapped(DBMGenericObject o1,
DBMGenericObject o2)
Checks if two DB-MAIN objects map together |
DBMAttribute |
findFirstMappingAttribute(DBMGenericObject go,
DBMSchema sch)
Finds the first attribute mapped with the specified generic object in the specified schema. |
DBMDataObject |
findFirstMappingDataObject(DBMGenericObject go,
DBMSchema sch)
Finds the first data object mapped with the specified generic object in the specified schema. |
DBMEntityType |
findFirstMappingEntityType(DBMGenericObject go,
DBMSchema sch)
Finds the first entity type mapped with the specified generic object in the specified schema. |
DBMEntityType |
findFirstMappingEntityType(java.lang.Object[] mappingOid,
DBMSchema sch)
Finds the first entity type mapped with the specified MappingOID values in the specified schema. |
DBMGroup |
findFirstMappingGroup(DBMGenericObject go,
DBMSchema sch)
Finds the first group mapped with the specified generic object in the specified schema. |
DBMRelationshipType |
findFirstMappingRelationshipType(DBMGenericObject go,
DBMSchema sch)
Finds the first relationship type mapped with the specified generic object in the specified schema. |
DBMGenericObject[] |
findMapping(DBMGenericObject go)
Finds all the generic objects mapped to the specified generic object (whatever the schema). |
DBMGenericObject[] |
findMapping(DBMGenericObject go,
DBMSchema sch)
Finds all the generic objects mapped to the specified object in the specified schema. |
DBMAttribute |
findMappingAttribute(DBMDataObject att,
DBMEntityType ent)
Finds the attribute mapped to the specified attribute in the specified entity type. |
java.util.Vector<DBMAttribute> |
findMappingAttribute(DBMGenericObject go,
DBMSchema sch)
Finds attributes mapped with the specified generic object in the specified schema. |
java.util.Vector<DBMAttribute> |
findMappingAttributeList(DBMDataObject att,
DBMEntityType ent)
Finds the attributes mapped to the specified attribute in the specified entity type. |
java.util.Vector<DBMDataObject> |
findMappingDataObject(DBMGenericObject go,
DBMSchema sch)
Finds data objects mapped with the specified generic object in the specified schema. |
java.util.Vector<DBMEntityType> |
findMappingEntityType(DBMGenericObject go,
DBMSchema sch)
Finds entity types mapped with the specified generic object in the specified schema. |
java.util.Vector<DBMGenericObject> |
findMappingGenericObject(DBMGenericObject go,
DBMSchema sch)
Finds all the generic objects mapped to the specified object in the specified schema. |
java.util.Vector<DBMGroup> |
findMappingGroup(DBMGenericObject go,
DBMSchema sch)
Finds groups mapped with the specified generic object in the specified schema. |
java.util.Vector<DBMRelationshipType> |
findMappingRelationshipType(DBMGenericObject go,
DBMSchema sch)
Finds relationship types mapped with the specified generic object in the specified schema. |
static DBMEntityType |
getEntityType(DBMDataObject dO)
Deprecated. use jidbmx.DataObjects.findEntityTypeOwner |
static java.util.List<java.lang.Integer> |
getListMapping(DBMGenericObject go)
Returns the "MappingOID" of 'go' |
static java.lang.Object[] |
getMappingOID(DBMGenericObject go)
|
static boolean |
haveCommonMappingOid(java.lang.Object[] oid1,
java.lang.Object[] oid2)
Checks if two array of MappingOID values have a nonempty intersection. |
static void |
initializeMapping(DBMGenericObject go)
Initializes the "MappingOID" of 'go' with its object identifier |
static void |
setMapping(DBMGenericObject go,
java.lang.Object[] mappingOid)
Sets the value list of "MappingOID" of the 'go' to 'mappingOid'. |
static void |
updateMapping(DBMGenericObject masterGo,
DBMGenericObject slaveGo)
Adds to 'masterGo' the 'MappingOID' of 'slaveGo' that are not presents in 'masterGo' |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MP_MAPPING_OID
| Constructor Detail |
|---|
public Mapping(java.util.LinkedList<java.util.LinkedList<DBMGenericObject>> schl)
schl - the objects of the repository to take into account in the mapping.
This is a LinkedList the elements of which must also be
LinkedList, corresponding to all the schemas to map. Each schema
LinkedList must be composed of all the objects of the schema,
starting by the schema itself.
public Mapping(DBMSchema sch1,
DBMSchema sch2)
sch1 - the first schema to mapsch2 - the second schema to map
public Mapping(DBMSchema sch1,
DBMSchema sch2,
DBMSchema sch3)
sch1 - the first schema to mapsch2 - the second schema to mapsch3 - the third schema to map
public Mapping(DBMSchema sch1,
DBMSchema sch2,
DBMSchema sch3,
DBMSchema sch4)
sch1 - the first schema to mapsch2 - the second schema to mapsch3 - the third schema to mapsch4 - the fourth schema to mappublic Mapping(java.util.Vector<DBMSchema> lsch)
lsch - the schema list| Method Detail |
|---|
public DBMGenericObject[] findMapping(DBMGenericObject go)
go - the generic object for which we want to find the mapped objects.
public DBMGenericObject[] findMapping(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the mapped objects.sch - the schema where to find the mapped object.
public java.util.Vector<DBMGenericObject> findMappingGenericObject(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the mapped objects.sch - the schema where to find the mapped object.
public DBMAttribute findMappingAttribute(DBMDataObject att,
DBMEntityType ent)
att - the attribute for which we want to find the mapped attribute.ent - the entity type where to find the mapped attribute.
public java.util.Vector<DBMAttribute> findMappingAttributeList(DBMDataObject att,
DBMEntityType ent)
att - the attribute for which we want to find the mapped attributes.ent - the entity type where to find the mapped attributes.
public static DBMEntityType getEntityType(DBMDataObject dO)
dO - the data object for which we want to find the owner.
public DBMDataObject findFirstMappingDataObject(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the first mapped data
object.sch - the schema where to find the mapped data object.
public java.util.Vector<DBMAttribute> findMappingAttribute(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the entity types.sch - the schema where to find the mapped entity types.
public DBMAttribute findFirstMappingAttribute(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the first mapped
attribute.sch - the schema where to find the mapped attribute.
public java.util.Vector<DBMRelationshipType> findMappingRelationshipType(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the entity types.sch - the schema where to find the mapped entity types.
public DBMRelationshipType findFirstMappingRelationshipType(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the first mapped
relationship type.sch - the schema where to find the mapped relationship type.
public DBMGroup findFirstMappingGroup(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the first mapped
group.sch - the schema where to find the mapped relationship type.
public DBMEntityType findFirstMappingEntityType(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the first mapped
entity type.sch - the schema where to find the mapped entity type.
public java.util.Vector<DBMDataObject> findMappingDataObject(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the data objects.sch - the schema where to find the mapped data objects.
public java.util.Vector<DBMEntityType> findMappingEntityType(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the entity types.sch - the schema where to find the mapped entity types.
public DBMEntityType findFirstMappingEntityType(java.lang.Object[] mappingOid,
DBMSchema sch)
mappingOid - the MappingOID value for which we want to find the first mapped
entity type.sch - the schema where to find the mapped entity types.
public java.util.Vector<DBMGroup> findMappingGroup(DBMGenericObject go,
DBMSchema sch)
go - the generic object for which we want to find the mapped groups.sch - the schema where to find the mapped groups.
public static boolean areMapped(DBMGenericObject o1,
DBMGenericObject o2)
o1 - the first objecto2 - the second object
public static boolean haveCommonMappingOid(java.lang.Object[] oid1,
java.lang.Object[] oid2)
oid1 - the first MappingOID value array.oid2 - the second MappingOID value array.
public static java.lang.Object[] getMappingOID(DBMGenericObject go)
public static java.util.List<java.lang.Integer> getListMapping(DBMGenericObject go)
go -
public static void setMapping(DBMGenericObject go,
java.lang.Object[] mappingOid)
go - mappingOid - public static void initializeMapping(DBMGenericObject go)
go -
public static void updateMapping(DBMGenericObject masterGo,
DBMGenericObject slaveGo)
rel - fk -
public static void addUnique(java.util.List<java.lang.Integer> masterOid,
java.util.List<java.lang.Integer> slaveOid)
masterOid - slaveOid -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||