001//
002// NAME
003//      ObjectServices.java
004//
005// COPYRIGHT
006//      Confidential Property of Kabira Technologies, Inc.
007//      Copyright 2007, 2009 by Kabira Technologies, Inc.
008//      All rights reserved.
009//
010// DESCRIPTION
011//
012// HISTORY
013//     $Revision: 1.1.2.83 $ $Date: 2012/04/03 00:11:05 $
014//
015// WARNINGS
016//      THIS FILE IS GENERATED, DO NOT EDIT
017//
018
019package com.kabira.platform.swbuiltin;
020
021import java.util.*;
022import com.kabira.platform.annotation.*;
023
024
025/**
026<p>
027       Object services
028<p>
029       Provides access to object level services.
030                A transaction is required access this class.
031
032
033*/
034
035public final class ObjectServices extends java.lang.Object
036{
037        private static final String _RuntimeType = "swbuiltin::ObjectServices";
038
039        private ObjectServices() { }
040
041
042        /**
043        <p>
044       Determine if object was created in
045                the current transaction.
046
047@param object        Object to check
048@return                true if the object was created.
049@throws ExceptionInvalidHandle Invalid object
050                handle
051
052<p>
053       This operation can be used to determine
054                if the specified object was created
055                in the current transaction.
056
057
058        */
059
060        public static final native boolean createdInTransaction(
061                        final java.lang.Object object);
062
063
064        /**
065        <p>
066       Determine if object was deleted in
067                the current transaction.
068
069@param object        Object to check
070@return                true if the object was deleted.
071@throws ExceptionInvalidHandle Invalid object
072                handle
073
074<p>
075       This operation can be used to determine
076                if the specified object was deleted
077                in the current transaction.
078
079<p>
080<b>Warnings: </b><p>
081If an instance has been deleted in a transaction,
082any attempt to cast the instance to a subtype will
083return an empty handle.
084
085
086        */
087
088        public static final native boolean deletedInTransaction(
089                        final java.lang.Object object);
090
091
092        /**
093        <p>
094       Determine if object was modified in
095                the current transaction.
096
097@param object        Object to check
098@return                true if the object was modified.
099@throws ExceptionInvalidHandle Invalid object
100                handle
101
102<p>
103       This operation can be used to determine
104                if the specified object was modified
105                in the current transaction.
106
107
108        */
109
110        public static final native boolean modifiedInTransaction(
111                        final java.lang.Object object);
112
113
114        /**
115        <p>
116       Flush an object from shared memory
117@param object        Object to flush
118<p>
119       Flush the specified object from
120                shared memory, leaving only its
121                index values so that it may later
122                be found either by key or object
123                reference and automatically be
124                refreshed.
125<p>
126                If the object was created in
127                the same transaction, or if
128                modifications were made to the
129                object in the same transaction,
130                they will be written to the
131                backing store before the object
132                is flushed.
133
134@throws com.kabira.platform.DataError <p>
135        The flush will fail and a DataError
136        exception will be thrown if the object
137        is not a DataGrid type, or is not
138        a local copy of a distributed
139        non-replicated type.
140
141
142        */
143
144        public static final native void flush(
145                        final java.lang.Object object);
146
147
148        /**
149        <p>
150       Flush an object from shared memory
151@param object        Object to flush
152@return                true if the object was flushed,
153                false otherwise.
154
155@deprecated         This method is deprecated, please use
156        ObjectServices.flush().
157
158
159        */
160
161        @Deprecated
162        public static final native boolean flushObject(
163                        com.kabira.platform.InOutParameter<java.lang.Object> object);
164
165
166        /**
167        <p>
168       Stringify an object reference
169@param object        Object to get reference for
170@return                Stringified object reference
171<p>
172        Get a stringified object reference for the
173        specified object.
174<p>
175        If the object is invalid, an empty string
176        is returned to the caller.
177
178
179        */
180
181        public static final native String objectToString(
182                        final java.lang.Object object);
183
184
185        /**
186        <p>
187       Convert a stringified object reference
188                to an Object
189
190@param refStr        Object reference string
191@return                Object associated with string
192<p>
193        Convert a stringified object reference to
194        an object.
195<p>
196        If the string reference is invalid an
197        empty object is returned to the caller.
198
199
200        */
201
202        public static final native java.lang.Object stringToObject(
203                        final String refStr);
204
205
206        /**
207        <p>
208       Run an object notifier
209<p>
210       When called, the inTransaction
211                method in the ObjectNotifier is
212                called for each locked object in the 
213                current transaction.
214
215
216        */
217
218        public static final native void runObjectNotifier(
219                        final com.kabira.platform.swbuiltin.ObjectNotifier objectNotifier);
220
221}