KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > data > SimpleModifiableDataObject


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: SimpleModifiableDataObject.java,v 1.5 2007/01/07 06:14:17 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.data;
23
24 import java.io.Serializable JavaDoc;
25 import java.sql.Timestamp JavaDoc;
26
27 /**
28  * This class is the simplest case of modifiable data object and it is useful in
29  * situations when we need transfer only the most basic identification information
30  * skipping the business data.
31  *
32  * This class is made final so that nobody cannot derive from it new classes
33  * since thats what the parent is for.
34  *
35  * @version $Id: SimpleModifiableDataObject.java,v 1.5 2007/01/07 06:14:17 bastafidli Exp $
36  * @author Martin Cerba
37  * @code.reviewer Miro Halas
38  * @code.reviewed 1.3 2005/09/07 16:36:02
39  */

40 public final class SimpleModifiableDataObject extends ModifiableDataObject
41                                               implements Serializable JavaDoc
42 {
43    // Attributes ///////////////////////////////////////////////////////////////
44

45    /**
46     * UUID used in java serialization
47     */

48    private static final long serialVersionUID = 6595790483450634915L;
49
50    // Constructors /////////////////////////////////////////////////////////////
51

52    /**
53     * Default constructor
54     */

55    public SimpleModifiableDataObject()
56    {
57       super();
58    }
59    
60    /**
61     * Simple constructor creating new data object in particular domain.
62     *
63     * @param iDomainId - domain this data object belongs to
64     */

65    public SimpleModifiableDataObject(
66       int iDomainId
67    )
68    {
69       super(DataObject.NEW_ID, iDomainId, null, null);
70    }
71    /**
72     * Full constructor
73     *
74     * @param iId - id of object
75     * @param iDomainId - domain id
76     * @param creationTimestamp - creation timestamp
77     * @param modificationTimestamp - modification timestamp
78     */

79    public SimpleModifiableDataObject(
80       int iId,
81       int iDomainId,
82       Timestamp JavaDoc creationTimestamp,
83       Timestamp JavaDoc modificationTimestamp
84    )
85    {
86       super(iId, iDomainId, creationTimestamp, modificationTimestamp);
87    }
88    
89    /**
90     * Copy constructor.
91     *
92     * @param data - source data object
93     */

94    public SimpleModifiableDataObject(
95       ModifiableDataObject data
96    )
97    {
98       super(data.getId(), data.getDomainId(), data.getCreationTimestamp(),
99             data.getModificationTimestamp());
100    }
101    
102    // Accessors ////////////////////////////////////////////////////////////////
103

104    /**
105     * {@inheritDoc}
106     */

107    public boolean isSame(
108       Object JavaDoc oObject
109    )
110    {
111       return true;
112    }
113 }
114
Popular Tags