information-system-model/src/main/java/org/gcube/informationsystem/base/impl/relations/BaseRelationImpl.java

47 lines
967 B
Java
Raw Normal View History

package org.gcube.informationsystem.base.impl.relations;
2019-10-24 11:26:49 +02:00
import org.gcube.informationsystem.base.impl.ERImpl;
import org.gcube.informationsystem.base.reference.entities.BaseEntity;
import org.gcube.informationsystem.base.reference.relations.BaseRelation;
2019-11-04 18:06:46 +01:00
public abstract class BaseRelationImpl<S extends BaseEntity, T extends BaseEntity> extends ERImpl implements BaseRelation<S, T> {
2019-10-24 11:26:49 +02:00
/**
* Generated Serial Version UID
*/
2019-10-24 11:26:49 +02:00
private static final long serialVersionUID = 28704968813390512L;
2019-11-04 18:06:46 +01:00
protected S source;
protected T target;
protected BaseRelationImpl() {
super();
}
2019-11-04 18:06:46 +01:00
protected BaseRelationImpl(S source, T target) {
2019-10-24 11:26:49 +02:00
this();
this.source = source;
this.target = target;
}
@Override
2019-11-04 18:06:46 +01:00
public S getSource() {
2019-10-24 11:26:49 +02:00
return source;
}
2019-10-24 11:26:49 +02:00
@Override
2019-11-04 18:06:46 +01:00
public void setSource(S source) {
2019-10-24 11:26:49 +02:00
this.source = source;
}
@Override
2019-11-04 18:06:46 +01:00
public T getTarget() {
2019-10-24 11:26:49 +02:00
return target;
}
@Override
2019-11-04 18:06:46 +01:00
public void setTarget(T target) {
2019-10-24 11:26:49 +02:00
this.target = target;
}
}