Fixed typo on ReferentialIntegrity enum name
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-orientdb-hooks@135168 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0e2daf1f07
commit
7a33c91c10
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.informationsystem.orientdb.hooks;
|
||||
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty;
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty.ReferentialIntegrity;
|
||||
import org.gcube.informationsystem.model.relation.ConsistsOf;
|
||||
|
||||
import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
|
||||
|
@ -14,11 +14,11 @@ import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
|
|||
public class ConsistsOfHook extends RelationHook {
|
||||
|
||||
public ConsistsOfHook() {
|
||||
super(ConsistsOf.NAME, RelationProperty.ReferentiaIntegrity.onDeleteCascadeWhenOrphan);
|
||||
super(ConsistsOf.NAME, ReferentialIntegrity.onDeleteCascadeWhenOrphan);
|
||||
}
|
||||
|
||||
public ConsistsOfHook(ODatabaseDocument database) {
|
||||
super(database, ConsistsOf.NAME, RelationProperty.ReferentiaIntegrity.onDeleteCascadeWhenOrphan);
|
||||
super(database, ConsistsOf.NAME, ReferentialIntegrity.onDeleteCascadeWhenOrphan);
|
||||
}
|
||||
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.informationsystem.orientdb.hooks;
|
||||
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty;
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty.ReferentialIntegrity;
|
||||
import org.gcube.informationsystem.model.relation.IsRelatedTo;
|
||||
|
||||
import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
|
||||
|
@ -15,11 +15,11 @@ import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
|
|||
public class IsRelatedToHook extends RelationHook {
|
||||
|
||||
public IsRelatedToHook() {
|
||||
super(IsRelatedTo.NAME, RelationProperty.ReferentiaIntegrity.onDeleteKeep);
|
||||
super(IsRelatedTo.NAME, ReferentialIntegrity.onDeleteKeep);
|
||||
}
|
||||
|
||||
public IsRelatedToHook(ODatabaseDocument database) {
|
||||
super(database, IsRelatedTo.NAME, RelationProperty.ReferentiaIntegrity.onDeleteKeep);
|
||||
super(database, IsRelatedTo.NAME, ReferentialIntegrity.onDeleteKeep);
|
||||
}
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
package org.gcube.informationsystem.orientdb.hooks;
|
||||
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty;
|
||||
import org.gcube.informationsystem.model.embedded.RelationProperty.ReferentialIntegrity;
|
||||
import org.gcube.informationsystem.model.relation.Relation;
|
||||
|
||||
import com.orientechnologies.common.log.OLogManager;
|
||||
|
@ -21,23 +22,21 @@ public abstract class RelationHook extends ODocumentHookAbstract implements
|
|||
ODatabaseLifecycleListener {
|
||||
|
||||
protected final String relationType;
|
||||
protected final RelationProperty.ReferentiaIntegrity referentiaIntegrity;
|
||||
protected final RelationProperty.ReferentialIntegrity referentiaIntegrity;
|
||||
|
||||
protected void init(String relationType) {
|
||||
setIncludeClasses(relationType);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public RelationHook(String relationType,
|
||||
RelationProperty.ReferentiaIntegrity referentiaIntegrity) {
|
||||
public RelationHook(String relationType, ReferentialIntegrity referentiaIntegrity) {
|
||||
super();
|
||||
this.relationType = relationType;
|
||||
this.referentiaIntegrity = referentiaIntegrity;
|
||||
init(relationType);
|
||||
}
|
||||
|
||||
public RelationHook(ODatabaseDocument database, String relationType,
|
||||
RelationProperty.ReferentiaIntegrity referentiaIntegrity) {
|
||||
public RelationHook(ODatabaseDocument database, String relationType, ReferentialIntegrity referentiaIntegrity) {
|
||||
super(database);
|
||||
this.relationType = relationType;
|
||||
this.referentiaIntegrity = referentiaIntegrity;
|
||||
|
@ -90,7 +89,7 @@ public abstract class RelationHook extends ODocumentHookAbstract implements
|
|||
} else {
|
||||
try {
|
||||
/* Checking provided ReferentiaIntegrity value */
|
||||
Enum.valueOf(RelationProperty.ReferentiaIntegrity.class,
|
||||
Enum.valueOf(ReferentialIntegrity.class,
|
||||
referentialIntegrityObject.toString());
|
||||
} catch (Exception e) {
|
||||
OLogManager
|
||||
|
|
Loading…
Reference in New Issue