public abstract class BaseProxy extends AbstractMonitorEnabled implements DBase
DBase.| Modifier and Type | Class and Description |
|---|---|
static class |
BaseProxy.DocumentCollectionIterator
Iterator for collections of documents.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DATETIME_STRING_LENGTH
Number of characters needed to represent a date/time value.
|
protected static 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.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseProxy(NotesProxyFactory theFactory,
DBase theParent,
lotus.domino.Base object,
DNotesMonitor monitor)
Creates a new DBaseImpl object.
|
| Modifier and Type | Method and Description |
|---|---|
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 List |
convertCalendarsToNotesDateTime(List list)
Converts every occurrence of a
java.util.Calendar or
java.util.Date in a List to a DateTime instance. |
protected Vector |
convertListToVector(List list)
Convert List to Vector.
|
protected List |
convertNotesDateTimesToCalendar(List list)
Converts every occurrence of a
DateTime object to a
java.util.Calendar instance. |
protected List |
convertVectorToList(Vector vector)
Deprecated.
the usage of the method convertVectorToList() is not needed and impacts performance
|
protected Calendar |
createCalendar(lotus.domino.DateTime dateTime)
Converts a Notes DateTime object into a Calendar.
|
protected lotus.domino.DateRange |
createDateRange(Calendar calendar1,
Calendar calendar2)
Creates a Notes
DateRange instance from two
java.util.Calendars. |
protected lotus.domino.DateTime |
createDateTime(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(String message)
Creates and returns a new exception with the given message.
|
protected DNotesException |
newException(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(String message)
Creates and returns a new runtime exception with the given message.
|
protected DNotesRuntimeException |
newRuntimeException(String message,
Exception e)
Creates and returns a new runtime exception with the given message.
|
protected void |
recycleDateTimeList(List list)
Recycles all Notes DateTime objects in a list.
|
int |
refereceHashCode()
Returns the hashCode of the referenced Notes object.
|
String |
toStringGeneric()
Utility method for the toString method of derived classes.
|
static String |
toStringIntern(Object object)
Returns a string representation of the object.
|
getMonitor, setMonitorprotected 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 String EMPTY_STRING
protected BaseProxy(NotesProxyFactory theFactory, DBase theParent, lotus.domino.Base object, DNotesMonitor monitor)
theFactory - the controlling factorytheParent - the parent objectobject - the notes objectmonitor - the monitorprotected final lotus.domino.Base getNotesObject()
protected final void clearNotesObject()
protected final DBase getParent()
null if no parent availableprotected final NotesProxyFactory getFactory()
public final String toStringGeneric()
Object.toString()protected final Vector convertListToVector(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 listprotected final List convertVectorToList(Vector vector)
List interface. But it is
synchronized. Therefore this conversion method provides a real List
that is not synchronized.vector - a vectorprotected final List convertNotesDateTimesToCalendar(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 contentprotected final List convertCalendarsToNotesDateTime(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 contentprotected final void recycleDateTimeList(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(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 convertprotected final lotus.domino.DateRange createDateRange(Calendar calendar1, Calendar calendar2)
DateRange instance from two
java.util.Calendars.
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 convertInternationalProxy.createDateRange(Calendar, Calendar)protected final 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 objectInternationalProxy.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 Throwable
finalize in class ObjectThrowable - the Exception raised by this methodObject.finalize()public final int refereceHashCode()
Object.hashCode()public static String toStringIntern(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 nullprotected final DNotesException newException(String message)
message - the messageprotected final DNotesException newException(String message, lotus.domino.NotesException e)
message - the messagee - the NotesException, can be nullprotected final DNotesRuntimeException newRuntimeException(lotus.domino.NotesException e)
e - the NotesException, can be nullprotected final DNotesRuntimeException newRuntimeException(String message)
message - the messageprotected final DNotesRuntimeException newRuntimeException(String message, Exception e)
message - the messagee - the NotesException, can be nullCopyright © 2005–2020. All rights reserved.