001: // license-header java merge-point
002: //
003: // Attention: Generated code! Do not modify by hand!
004: // Generated by: ValueObject.vsl in andromda-java-cartridge.
005: //
006: package ru.emdev.EmForge.svn.web;
007:
008: /**
009: * Value object to hold the svn directory data
010: */
011: public class SvnDataVO implements java.io.Serializable,
012: java.lang.Comparable<SvnDataVO> {
013: /**
014: * The serial version UID of this class. Needed for serialization.
015: */
016: private static final long serialVersionUID = 6335767133332298618L;
017:
018: public SvnDataVO() {
019: }
020:
021: public SvnDataVO(java.lang.String name, java.lang.String strSize,
022: java.lang.Long size, java.lang.String revision,
023: java.lang.String age, java.util.Date date,
024: java.lang.String kind, java.lang.String path,
025: java.lang.String lastChange, java.lang.String author,
026: java.lang.String commitMessage) {
027: this .name = name;
028: this .strSize = strSize;
029: this .size = size;
030: this .revision = revision;
031: this .age = age;
032: this .date = date;
033: this .kind = kind;
034: this .path = path;
035: this .lastChange = lastChange;
036: this .author = author;
037: this .commitMessage = commitMessage;
038: }
039:
040: /**
041: * Copies constructor from other SvnDataVO
042: *
043: * @param otherBean, cannot be <code>null</code>
044: * @throws java.lang.NullPointerException if the argument is <code>null</code>
045: */
046: public SvnDataVO(SvnDataVO otherBean) {
047: this (otherBean.getName(), otherBean.getStrSize(), otherBean
048: .getSize(), otherBean.getRevision(),
049: otherBean.getAge(), otherBean.getDate(), otherBean
050: .getKind(), otherBean.getPath(), otherBean
051: .getLastChange(), otherBean.getAuthor(),
052: otherBean.getCommitMessage());
053: }
054:
055: /**
056: * Copies all properties from the argument value object into this value object.
057: */
058: public void copy(SvnDataVO otherBean) {
059: if (otherBean != null) {
060: this .setName(otherBean.getName());
061: this .setStrSize(otherBean.getStrSize());
062: this .setSize(otherBean.getSize());
063: this .setRevision(otherBean.getRevision());
064: this .setAge(otherBean.getAge());
065: this .setDate(otherBean.getDate());
066: this .setKind(otherBean.getKind());
067: this .setPath(otherBean.getPath());
068: this .setLastChange(otherBean.getLastChange());
069: this .setAuthor(otherBean.getAuthor());
070: this .setCommitMessage(otherBean.getCommitMessage());
071: }
072: }
073:
074: private java.lang.String name;
075:
076: /**
077: * Item name
078: */
079: public java.lang.String getName() {
080: return this .name;
081: }
082:
083: public void setName(java.lang.String name) {
084: this .name = name;
085: }
086:
087: private java.lang.String strSize;
088:
089: /**
090: * Item size in text format ("xx bytes", "yy kbytes")
091: */
092: public java.lang.String getStrSize() {
093: return this .strSize;
094: }
095:
096: public void setStrSize(java.lang.String strSize) {
097: this .strSize = strSize;
098: }
099:
100: private java.lang.Long size;
101:
102: /**
103: * The item size
104: */
105: public java.lang.Long getSize() {
106: return this .size;
107: }
108:
109: public void setSize(java.lang.Long size) {
110: this .size = size;
111: }
112:
113: private java.lang.String revision;
114:
115: /**
116: * Item last revision
117: */
118: public java.lang.String getRevision() {
119: return this .revision;
120: }
121:
122: public void setRevision(java.lang.String revision) {
123: this .revision = revision;
124: }
125:
126: private java.lang.String age;
127:
128: /**
129: * Item date in text format ("xx days ago", "yy months ago", etc.)
130: */
131: public java.lang.String getAge() {
132: return this .age;
133: }
134:
135: public void setAge(java.lang.String age) {
136: this .age = age;
137: }
138:
139: private java.util.Date date;
140:
141: /**
142: * Item date
143: */
144: public java.util.Date getDate() {
145: return this .date;
146: }
147:
148: public void setDate(java.util.Date date) {
149: this .date = date;
150: }
151:
152: private java.lang.String kind;
153:
154: /**
155: * Item kind ("dir" or "file")
156: */
157: public java.lang.String getKind() {
158: return this .kind;
159: }
160:
161: public void setKind(java.lang.String kind) {
162: this .kind = kind;
163: }
164:
165: private java.lang.String path;
166:
167: /**
168: * Item fully qualified path
169: */
170: public java.lang.String getPath() {
171: return this .path;
172: }
173:
174: public void setPath(java.lang.String path) {
175: this .path = path;
176: }
177:
178: private java.lang.String lastChange;
179:
180: /**
181: * Item author and commit message
182: */
183: public java.lang.String getLastChange() {
184: return this .lastChange;
185: }
186:
187: public void setLastChange(java.lang.String lastChange) {
188: this .lastChange = lastChange;
189: }
190:
191: private java.lang.String author;
192:
193: /**
194: * Item author
195: */
196: public java.lang.String getAuthor() {
197: return this .author;
198: }
199:
200: public void setAuthor(java.lang.String author) {
201: this .author = author;
202: }
203:
204: private java.lang.String commitMessage;
205:
206: /**
207: * Item commit message
208: */
209: public java.lang.String getCommitMessage() {
210: return this .commitMessage;
211: }
212:
213: public void setCommitMessage(java.lang.String commitMessage) {
214: this .commitMessage = commitMessage;
215: }
216:
217: public int compareTo(SvnDataVO other) {
218: if (this .kind.equals("dir")) //folder
219: if (other.kind.equals("dir")) //other is folder too
220: return this .name.compareToIgnoreCase(other.name);
221: else
222: //other is file
223: return -1;
224: else //this is file
225: if (other.kind.equals("dir")) //other is folder
226: return 1;
227: else
228: //other is file too
229: return this.name.compareToIgnoreCase(other.name);
230: }
231:
232: }
|