Skip to content

Commit

Permalink
added entity state to extension values
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Jan 23, 2018
1 parent 2ff9a5a commit 83244df
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 1 deletion.
Expand Up @@ -39,6 +39,8 @@
@Index(name = "iExtensionBooleanDef", columnNames = {"owner_oid", "ownerType"})})
public class ROExtBoolean implements ROExtValue {

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -58,6 +60,17 @@ public ROExtBoolean(Boolean value) {
this.value = value;
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_boolean")
@MapsId("owner")
Expand Down
Expand Up @@ -40,6 +40,8 @@
@Index(name = "iExtensionDateDef", columnNames = {"owner_oid", "ownerType"})})
public class ROExtDate implements ROExtValue {

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -59,6 +61,17 @@ public ROExtDate(Timestamp value) {
this.value = value;
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_date")
@MapsId("owner")
Expand Down
Expand Up @@ -39,6 +39,8 @@
@Index(name = "iExtensionLongDef", columnNames = {"owner_oid", "ownerType"})})
public class ROExtLong implements ROExtValue {

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -58,6 +60,17 @@ public ROExtLong(Long value) {
this.value = value;
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_long")
@MapsId("owner")
Expand Down
Expand Up @@ -40,6 +40,8 @@
@Index(name = "iExtensionPolyStringDef", columnNames = {"owner_oid", "ownerType"})})
public class ROExtPolyString implements ROExtValue {

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -65,6 +67,17 @@ public ROExtPolyString(PolyString polyString) {
}
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_poly")
@MapsId("owner")
Expand Down
Expand Up @@ -46,6 +46,8 @@ public class ROExtReference implements ROExtValue {
public static final String F_RELATION = "relation";
public static final String F_TARGET_TYPE = "targetType";

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -65,6 +67,17 @@ public class ROExtReference implements ROExtValue {
public ROExtReference() {
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_reference")
@MapsId("owner")
Expand Down
Expand Up @@ -39,6 +39,8 @@
@Index(name = "iExtensionStringDef", columnNames = {"owner_oid", "ownerType"})})
public class ROExtString implements ROExtValue {

private Boolean trans;

//owner entity
private RObject owner;
private String ownerOid;
Expand All @@ -58,6 +60,17 @@ public ROExtString(String value) {
this.value = value;
}

@Transient
@Override
public Boolean isTransient() {
return trans;
}

@Override
public void setTransient(Boolean trans) {
this.trans = trans;
}

@Id
@ForeignKey(name = "fk_object_ext_string")
@MapsId("owner")
Expand Down
Expand Up @@ -2,11 +2,12 @@

import com.evolveum.midpoint.repo.sql.data.common.RObject;
import com.evolveum.midpoint.repo.sql.data.common.type.RObjectExtensionType;
import com.evolveum.midpoint.repo.sql.util.EntityState;

/**
* @author lazyman
*/
public interface ROExtValue extends RAnyValue {
public interface ROExtValue extends RAnyValue, EntityState {

String OWNER = "owner";

Expand Down

0 comments on commit 83244df

Please sign in to comment.