blob: aa00aa8846daabe951867d8e2f034efac300a1bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
/*
* Copyright (c) 2010-2012, 2015 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Simon McDuff - initial API and implementation
* Ibrahim Sallam - code refactoring for CDO 3.0
*/
package org.eclipse.emf.cdo.server.internal.objectivity.schema;
import com.objy.db.app.ManyToOne;
import com.objy.db.app.Relationship;
import com.objy.db.app.ToOneRelationship;
import com.objy.db.app.ooObj;
public class ObjyPackageInfo extends ooObj
{
protected String packageURI;
protected String parentURI;
protected String unitID;
protected ToOneRelationship packageUnit;
private String name;
public static ManyToOne packageUnit_Relationship()
{
return new ManyToOne("packageUnit", // field name
"org.eclipse.emf.cdo.server.internal.objectivity.schema.ObjyPackageUnit", // name of related class
"packageInfos", // inverse relationship field name
Relationship.COPY_DELETE, Relationship.VERSION_DELETE, false, false, Relationship.INLINE_NONE); // none-inline
// association
}
/**
* set parent packageUnit
*/
public void setPackageUnit(ObjyPackageUnit objyPackageUnit)
{
markModified();
packageUnit.form(objyPackageUnit);
}
/**
* get related parent Node
*/
public ObjyPackageUnit getPackageUnit()
{
fetch();
return (ObjyPackageUnit)packageUnit.get();
}
/**
* clear parent relationship
*/
public void removePackageUnit()
{
markModified();
packageUnit.clear();
}
public String getPackageURI()
{
fetch();
return packageURI;
}
public void setPackageURI(String packageURI)
{
markModified();
this.packageURI = packageURI;
}
public String getParentURI()
{
fetch();
return parentURI;
}
public void setParentURI(String parentURI)
{
markModified();
this.parentURI = parentURI;
}
public String getUnitID()
{
fetch();
return unitID;
}
public void setUnitID(String unitID)
{
markModified();
this.unitID = unitID;
}
public void setPackageName(String name)
{
markModified();
this.name = name;
}
public String getPackageName()
{
fetch();
return name;
}
// package unique name is Hash of the URI.
public String getPackageUniqueName()
{
fetch();
String uriHash = new Integer(Math.abs(getPackageURI().hashCode())).toString();
return uriHash;
}
}
|