2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
6 package TransactionalIO.core;
8 import TransactionalIO.Utilities.Range;
14 public class WriteOperations implements Comparable{
18 private boolean unknownoffset;
19 private TransactionLocalFileAttributes belongingto;
20 private TransactionalFile ownertransactionalfile;
22 public WriteOperations(Byte[] data, Range range, boolean unknownoffset, TransactionalFile ownertransactionalfile, TransactionLocalFileAttributes belongingto) {
25 this.unknownoffset = unknownoffset;
26 this.ownertransactionalfile = ownertransactionalfile;
27 this.belongingto = belongingto;
30 public TransactionalFile getOwnertransactionalFile() {
31 return ownertransactionalfile;
34 public void setOwnertransaction(TransactionalFile ownertransaction) {
35 this.ownertransactionalfile = ownertransaction;
40 public Byte[] getData() {
44 public Range getRange() {
48 public boolean isUnknownoffset() {
52 public void setData(Byte[] data) {
53 this.data = new Byte[data.length];
54 System.arraycopy(data, 0, this.data, 0, data.length);
57 public void setRange(Range range) {
61 public void setUnknownoffset(boolean unknownoffset) {
62 this.unknownoffset = unknownoffset;
65 public TransactionLocalFileAttributes getBelongingto() {
69 public void setBelongingto(TransactionLocalFileAttributes belongingto) {
70 this.belongingto = belongingto;
74 public int compareTo(Object other) {
75 WriteOperations tmp = (WriteOperations) other;
76 return this.range.compareTo(tmp.range);