public final class OrgModelTools
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Date |
createDate(long timeInMillis)
Creates a date from the given time in milliseconds, i.e. hours, minutes,
seconds and milliseconds will be set to
0; only year, month
and day remain. |
static java.text.DateFormat |
createDateFormat()
Returns a new
DateFormat to handle dates (w/o time) in the
format yyyy-MM-dd. |
static java.text.DateFormat |
createDisplayTimestampFormat(java.util.TimeZone tz)
Returns a new
DateFormat to handle date + time (= timestamp)
in the format yyyy-MM-dd HH:mm:ss. |
static java.util.Date |
createTime(long timeInMillis)
Creates a time from the given time in milliseconds, i.e. the year will be
set to
1970, month to 0, day to
1, milliseconds to 0; while hours, minutes
and seconds remain. |
static java.text.DateFormat |
createTimeFormat()
Returns a new
DateFormat to handle times (w/o date) in the
format HH:mm:ss. |
static java.util.Date |
createTimestamp(long timeInMillis)
Creates a timestamp from the given time in milliseconds, i.e. milliseconds
will be set to
0; all other values remain. |
static java.text.DateFormat |
createTimestampFormat()
Returns a new
DateFormat to handle date + time (= timestamp)
in the format yyyy-MM-dd HH:mm:ss. |
static boolean |
isValidAttributeName(java.lang.String attrName)
Returns whether the given string is a valid attribute name for entity
types.
|
static boolean |
parameterUsedAsValue(ParameterRefReplacer replacer)
Returns if the current parameter reference in the specified replacer is
used as placeholder for a value.
|
static java.lang.String |
toPolicyToken(java.lang.Object value)
Formats the value object to a string that can be used in OrgPolicies.
|
public static boolean isValidAttributeName(java.lang.String attrName)
attrName - the string to be testedpublic static java.util.Date createDate(long timeInMillis)
0; only year, month
and day remain.timeInMillis - time in milliseconds to create the date frompublic static java.util.Date createTime(long timeInMillis)
1970, month to 0, day to
1, milliseconds to 0; while hours, minutes
and seconds remain.timeInMillis - time in milliseconds to create the time frompublic static java.util.Date createTimestamp(long timeInMillis)
0; all other values remain.timeInMillis - time in milliseconds to create the timestamp frompublic static java.text.DateFormat createDateFormat()
DateFormat to handle dates (w/o time) in the
format yyyy-MM-dd. The assumed time zone is UTC.DateFormat to handle dates (w/o time)public static java.text.DateFormat createTimeFormat()
DateFormat to handle times (w/o date) in the
format HH:mm:ss. The assumed time zone is UTC.DateFormat to handle times (w/o date)public static java.text.DateFormat createTimestampFormat()
DateFormat to handle date + time (= timestamp)
in the format yyyy-MM-dd HH:mm:ss. The assumed time zone
is UTC.DateFormat to handle date + timepublic static java.text.DateFormat createDisplayTimestampFormat(java.util.TimeZone tz)
DateFormat to handle date + time (= timestamp)
in the format yyyy-MM-dd HH:mm:ss.tz - the time zone to be usedDateFormat to handle date + timepublic static java.lang.String toPolicyToken(java.lang.Object value)
s_simple_string will result in
's_simple_string'.value - the value object to be formattedpublic static boolean parameterUsedAsValue(ParameterRefReplacer replacer)
replacer - the used replacertrue if the current parameter reference in the specified
formatter is used as a value; false if it's used as an
entity expression