01: /**********************************************************************
02: Copyright (c) 2007 Andy Jefferson 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: Contributors:
16: ...
17: **********************************************************************/package org.jpox.metadata;
18:
19: /**
20: * Series of flag settings used in the persistence process.
21: * Copied from javax.jdo.spi.PersistenceCapable for when we don't need jdo.jar present.
22: * @version $Revision: 1.1 $
23: */
24: public class PersistenceFlags {
25: /**
26: * If jpoxFieldFlags is set to READ_WRITE_OK, then the fields in the default fetch group
27: * can be accessed for read or write without notifying the StateManager.
28: */
29: static final byte READ_WRITE_OK = 0;
30:
31: /**
32: * If jpoxFieldFlags is set to LOAD_REQUIRED, then the fields in the default fetch group
33: * cannot be accessed for read or write without notifying the StateManager.
34: */
35: static final byte LOAD_REQUIRED = 1;
36:
37: /**
38: * If jpoxFieldFlags is set to READ_OK, then the fields in the default fetch group
39: * can be accessed for read without notifying the StateManager.
40: */
41: static final byte READ_OK = -1;
42:
43: /**
44: * If jpoxFieldFlags for a field includes CHECK_READ, then the field has been enhanced to call the
45: * StateManager on read if the jdoFlags setting is not READ_OK or READ_WRITE_OK.
46: */
47: static final byte CHECK_READ = 1;
48:
49: /**
50: * If jpoxFieldFlags for a field includes MEDIATE_READ, then the field has been enhanced to always
51: * call the StateManager on all reads.
52: */
53: static final byte MEDIATE_READ = 2;
54:
55: /**
56: * If jpoxFieldFlags for a field includes CHECK_WRITE, then the field has been enhanced to call the
57: * StateManager on write if the jpoxFlags setting is not READ_WRITE_OK;.
58: */
59: static final byte CHECK_WRITE = 4;
60:
61: /**
62: * If jpoxFieldFlags for a field includes MEDIATE_WRITE, then the field has been enhanced to always
63: * call the StateManager on all writes.
64: */
65: static final byte MEDIATE_WRITE = 8;
66:
67: /**
68: * If jpoxFieldFlags for a field includes SERIALIZABLE, then the field is not declared as TRANSIENT.
69: */
70: static final byte SERIALIZABLE = 16;
71: }
|