|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.monitor.AbstractMonitorEnabled de.bea.domingo.proxy.BaseProxy
public abstract class BaseProxy
Abstract base class for all implementations of interfaces derived from
DBase
.
Nested Class Summary | |
---|---|
static class |
BaseProxy.DocumentCollectionIterator
Iterator for collections of documents. |
Field Summary | |
---|---|
protected static int |
DATETIME_STRING_LENGTH
Number of characters needed to represent a date/time value. |
protected static java.lang.String |
EMPTY_STRING
The empty string. |
protected static int |
MAX_DATETIME_LENGTH
maximum number of characters to parse in method getItemValues(). |
protected static int |
NUM_DATETIME_VALUES
Maximum number of items supported in method getItemValues(). |
protected static Resources |
RESOURCES
Internationalized resources. |
Constructor Summary | |
---|---|
protected |
BaseProxy(NotesProxyFactory theFactory,
DBase theParent,
lotus.domino.Base object,
DNotesMonitor monitor)
Creates a new DBaseImpl object. |
Method Summary | |
---|---|
protected void |
checkSession(lotus.domino.DateTime dateTime)
Checks and monitors an error if a DateTime object doesn't
have a parent session. |
protected void |
clearNotesObject()
Clears the associated notes object, used during dispose/recycle operations. |
protected java.util.List |
convertCalendarsToNotesDateTime(java.util.List list)
Converts every occurrence of a java.util.Calendar or
java.util.Date in a List to a DateTime instance. |
protected java.util.Vector |
convertListToVector(java.util.List list)
Convert List to Vector. |
protected java.util.List |
convertNotesDateTimesToCalendar(java.util.List list)
Converts every occurrence of a DateTime object to a
java.util.Calendar instance. |
protected java.util.List |
convertVectorToList(java.util.Vector vector)
Deprecated. the usage of the method convertVectorToList() is not needed and impacts performance |
protected java.util.Calendar |
createCalendar(lotus.domino.DateTime dateTime)
Converts a Notes DateTime object into a Calendar. |
protected lotus.domino.DateRange |
createDateRange(java.util.Calendar calendar1,
java.util.Calendar calendar2)
Creates a Notes DateRange instance from two
java.util.Calendar s. |
protected lotus.domino.DateTime |
createDateTime(java.util.Calendar calendar)
Creates a Notes DateTime instance from a
java.util.Calendar . |
static int |
decrementDateTimeCounter()
Decrements the global counter for DateTime objects. |
protected void |
finalize()
|
static int |
getCountDateTime()
Returns the global counter for DateTime objects. |
protected SessionProxy |
getDSession()
Returns the Domingo session that created the current object. |
protected NotesProxyFactory |
getFactory()
Returns the factory corresponding to this instance. |
protected lotus.domino.Base |
getNotesObject()
Returns the Notes object associated with an instance. |
protected DBase |
getParent()
Returns the parent object. |
static int |
incrementDateTimeCounter()
Increments the global counter for DateTime objects. |
protected DNotesException |
newException(lotus.domino.NotesException e)
Creates and returns a new exception wrapping a given NotesException. |
protected DNotesException |
newException(java.lang.String message)
Creates and returns a new exception with the given message. |
protected DNotesException |
newException(java.lang.String message,
lotus.domino.NotesException e)
Creates and returns a new exception wrapping a given NotesException. |
protected DNotesRuntimeException |
newRuntimeException(lotus.domino.NotesException e)
Creates and returns a new runtime exception wrapping a given NotesException. |
protected DNotesRuntimeException |
newRuntimeException(java.lang.String message)
Creates and returns a new runtime exception with the given message. |
protected DNotesRuntimeException |
newRuntimeException(java.lang.String message,
java.lang.Exception e)
Creates and returns a new runtime exception with the given message. |
protected void |
recycleDateTimeList(java.util.List list)
Recycles all Notes DateTime objects in a list. |
int |
refereceHashCode()
Returns the hashCode of the referenced Notes object. |
java.lang.String |
toStringGeneric()
Utility method for the toString method of derived classes. |
static java.lang.String |
toStringIntern(java.lang.Object object)
Returns a string representation of the object. |
Methods inherited from class de.bea.domingo.monitor.AbstractMonitorEnabled |
---|
getMonitor, setMonitor |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.bea.domingo.DBase |
---|
equals, hashCode, toString |
Field Detail |
---|
protected static final Resources RESOURCES
protected static final int DATETIME_STRING_LENGTH
protected static final int NUM_DATETIME_VALUES
protected static final int MAX_DATETIME_LENGTH
protected static final java.lang.String EMPTY_STRING
Constructor Detail |
---|
protected BaseProxy(NotesProxyFactory theFactory, DBase theParent, lotus.domino.Base object, DNotesMonitor monitor)
theFactory
- the controlling factorytheParent
- the parent objectobject
- the notes objectmonitor
- the monitorMethod Detail |
---|
protected final lotus.domino.Base getNotesObject()
protected final void clearNotesObject()
protected final DBase getParent()
null
if no parent availableprotected final NotesProxyFactory getFactory()
public final java.lang.String toStringGeneric()
Object.toString()
protected final java.util.Vector convertListToVector(java.util.List list)
If the implementation of the List
interface is a Vector,
this vector is used unchanged, else the references of elements of the
List
are copied to a new result Vector
.
list
- a list
protected final java.util.List convertVectorToList(java.util.Vector vector)
List
interface. But it is
synchronized. Therefore this conversion method provides a real List
that is not synchronized.
vector
- a vector
protected final java.util.List convertNotesDateTimesToCalendar(java.util.List list)
DateTime
object to a
java.util.Calendar
instance.
The created DateTime objects must get recycled somewhen later, when they are not needed anymore. To ensure this, the calling method must call the method recycleDateTimeList() after usage.
Lists are processed recursivly; this is e.g. needed for column values that might contain value lists in the list of column values.
list
- the list to convert its content
protected final java.util.List convertCalendarsToNotesDateTime(java.util.List list)
java.util.Calendar
or
java.util.Date
in a List to a DateTime
instance.
ATTENTION:
The created DateTime objects must get recycled somewhen later, when
they are not needed anymore. To ensure this, the calling method must call
the method recycleDateTimeList() after usage.
Example
List keys; // initialize and fill list with Date objects and others List convertedList = convertDatesToNotesDateTime(keys); // now the list contains Notes DateTime objects. // do something with the list recycleDateTimeList(convertedKeys);
list
- the list to convert its content
protected final void recycleDateTimeList(java.util.List list)
The list can have mixed content and must not contain only DateTime objects. But only DateTime objects are recycled.
list
- any list implementationprotected final SessionProxy getDSession()
protected final lotus.domino.DateTime createDateTime(java.util.Calendar calendar)
DateTime
instance from a
java.util.Calendar
.
Adapter to InternationalProxy.
This is a convenience method to allow every object to convert dates.
calendar
- the calendar to convert
protected final lotus.domino.DateRange createDateRange(java.util.Calendar calendar1, java.util.Calendar calendar2)
DateRange
instance from two
java.util.Calendar
s.
Adapter to InternationalProxy.
This is a convenience method to allow every object to convert dates.
calendar1
- the start calendar to convertcalendar2
- the end calendar to convert
InternationalProxy.createDateRange(Calendar, Calendar)
protected final java.util.Calendar createCalendar(lotus.domino.DateTime dateTime)
Milli seconds are cleared in all cases.
Adapter to InternationalProxy. This is a convenience method to allow every object to convert dates.
dateTime
- a Notes DateTime object
InternationalProxy.createCalendar(DateTime)
protected final void checkSession(lotus.domino.DateTime dateTime)
DateTime
object doesn't
have a parent session.
dateTime
- the DateTime object to checkprotected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- the Exception
raised by this methodObject.finalize()
public final int refereceHashCode()
Object.hashCode()
public static java.lang.String toStringIntern(java.lang.Object object)
The toStringIntern
method
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
object.getClass().getName() + '@' + Integer.toHexString(object.hashCode())
object
- the reference object to use.
Object.toString()
public static int getCountDateTime()
public static int incrementDateTimeCounter()
public static int decrementDateTimeCounter()
protected final DNotesException newException(lotus.domino.NotesException e)
e
- the NotesException, can be null
protected final DNotesException newException(java.lang.String message)
message
- the message
protected final DNotesException newException(java.lang.String message, lotus.domino.NotesException e)
message
- the messagee
- the NotesException, can be null
protected final DNotesRuntimeException newRuntimeException(lotus.domino.NotesException e)
e
- the NotesException, can be null
protected final DNotesRuntimeException newRuntimeException(java.lang.String message)
message
- the message
protected final DNotesRuntimeException newRuntimeException(java.lang.String message, java.lang.Exception e)
message
- the messagee
- the NotesException, can be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |