org.beigesoft.replicator.persistable.AReplicationMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beige-replicator Show documentation
Show all versions of beige-replicator Show documentation
It replicate/persist any entity according XML settings and user's requirements with a file or network (HTTP).
Right now it has implemented XML format of stored/transferred data.
The newest version!
package org.beigesoft.replicator.persistable;
/*
* Beigesoft ™
*
* Licensed under the Apache License, Version 2.0
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
import java.util.Date;
import org.beigesoft.persistable.APersistableBaseHasName;
/**
*
* Model of Replication Method.
* Database replication one way specification #1.
* itsVersion changed time algorithm.
*
*
* @author Yury Demidenko
*/
public abstract class AReplicationMethod extends APersistableBaseHasName {
/**
* Last date replication, nullable.
**/
private Date lastDateReplication;
/**
* Requested database ID, not null.
**/
private Integer requestedDatabaseId;
//Hiding references getters and setters:
/**
* Getter for lastDateReplication.
* @return Date
**/
public final Date getLastDateReplication() {
if (this.lastDateReplication == null) {
return null;
}
return new Date(this.lastDateReplication.getTime());
}
/**
* Setter for lastDateReplication.
* @param pLastDateReplication reference
**/
public final void setLastDateReplication(final Date pLastDateReplication) {
if (pLastDateReplication == null) {
this.lastDateReplication = null;
} else {
this.lastDateReplication = new Date(pLastDateReplication.getTime());
}
}
//Simple getters and setters:
/**
* Getter for requestedDatabaseId.
* @return Integer
**/
public final Integer getRequestedDatabaseId() {
return this.requestedDatabaseId;
}
/**
* Setter for requestedDatabaseId.
* @param pRequestedDatabaseId reference
**/
public final void setRequestedDatabaseId(final Integer pRequestedDatabaseId) {
this.requestedDatabaseId = pRequestedDatabaseId;
}
}