01: /**********************************************************************
02: Copyright (c) 2004 Erik Bengtson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15:
16: Contributors:
17: 2005 Andy Jefferson - split into own file
18: ...
19: **********************************************************************/package org.jpox.jdo.state;
20:
21: import org.jpox.StateManager;
22: import org.jpox.state.LifeCycleState;
23:
24: /**
25: * Class representing the life cycle state of DetachedClean.
26: *
27: * @version $Revision: 1.2 $
28: **/
29: class DetachedClean extends LifeCycleState {
30: /** Protected Constructor to prevent external instantiation. */
31: protected DetachedClean() {
32: isPersistent = false;
33: isDirty = false;
34: isNew = false;
35: isDeleted = false;
36: isTransactional = false;
37:
38: stateType = DETACHED_CLEAN;
39: }
40:
41: /**
42: * Method to return a string version of this object.
43: * @return The string "DETACHED_CLEAN".
44: **/
45: public String toString() {
46: return "DETACHED_CLEAN";
47: }
48:
49: /**
50: * Method to transition to persistent-clean.
51: * @param sm StateManager.
52: * @return new LifeCycle state.
53: **/
54: public LifeCycleState transitionAttach(StateManager sm) {
55: return changeState(sm, P_CLEAN);
56: }
57: }
|