Package org.compiere.util
Class DisplayType
java.lang.Object
org.compiere.util.DisplayType
System Display/Data Types.
SELECT AD_Reference_ID, Name FROM AD_Reference WHERE ValidationType = 'D'
- Version:
- $Id: DisplayType.java,v 1.6 2006/08/30 20:30:44 comdivision Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1810632 ] PricePrecision error in InfoProduct (and similar)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Display Type 25 Accountstatic final int
Display Type 12 Amountstatic final int
Display Type 33 Assignmentstatic final int
Display Type 23 BLOBstatic final int
Display Type 28 Buttonstatic final int
static final int
static final int
static final int
static final int
Display Type 27 Colorstatic final int
Display Type 37 CostPricestatic final int
static final int
Display Type 15 Datestatic final int
Display Type 16 DateTimestatic final String
static final String
static final String
static final int
Display Type 39 File Namestatic final int
Display Type 38 File Pathstatic final int
Display Type 13 IDstatic final int
Display Type 32 Imagestatic final int
Display Type 11 Integerstatic final int
static final int
Display Type 17 Liststatic final int
Display Type 21 Locationstatic final int
Display Type 31 Locatorstatic final int
Display Type 34 Memostatic final int
static final int
Display Type 22 Numberstatic final int
Display Type 35 PAttributestatic final int
Display Type 200012 Paymentstatic final int
Display Type 42 PrinterNamestatic final int
Display Type 29 Quantitystatic final int
static final int
static final int
static final int
Display Type 26 RowIDstatic final int
static final int
Display Type 30 Searchstatic final int
Display Type 200235 Searchstatic final int
static final int
Display Type 10 Stringstatic final int
Display Type 18 Tablestatic final int
Display Type 19 TableDirstatic final int
Display Type 200234static final int
Display Type 200233 Tablestatic final int
Display Type 14 Textstatic final int
Display Type 36 CLOBstatic final int
Display Type 24 Timestatic final int
static final int
static final int
Display Type 40 URLstatic final int
Display Type 200231 UUIDstatic final int
Display Type 20 YN -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>
getClass
(int displayType, boolean yesNoAsBoolean) Return Storage Class.static NumberFormat
getCurrencyFormat
(String langcode, String currencyCode) Helper method to get a currency format in a language (multi-currency and multi-language system)static SimpleDateFormat
Return Date Formatstatic SimpleDateFormat
getDateFormat
(int displayType) Return format for date displayTypestatic SimpleDateFormat
getDateFormat
(int displayType, Language language) Return format for date displayTypestatic SimpleDateFormat
getDateFormat
(int displayType, Language language, String pattern) Return format for date displayTypestatic SimpleDateFormat
getDateFormat
(Language language) Return Date Formatstatic SimpleDateFormat
JDBC Date Format YYYY-MM-DDstatic int
getDefaultPrecision
(int displayType) Get Default Precision.static String
getDescription
(int displayType) Get Descriptionstatic DecimalFormat
getNumberFormat
(int displayType) Return Format for numeric DisplayTypestatic DecimalFormat
getNumberFormat
(int displayType, Language language) Return Format for numeric DisplayTypestatic DecimalFormat
getNumberFormat
(int displayType, Language language, String pattern) Return Format for numeric DisplayTypestatic String
getSQLDataType
(int displayType, String columnName, int fieldLength) Get SQL DataTypestatic SimpleDateFormat
static SimpleDateFormat
JDBC Timestamp Format yyyy-mm-dd hh:mm:ssstatic boolean
isChosenMultipleSelection
(int displayType) static boolean
isDate
(int displayType) Returns true if DisplayType is a Date.static boolean
isID
(int displayType) Returns true if (numeric) ID (Table, Search, Account, ..).static boolean
isList
(int displayType) Returns true if DisplayType is a List.static boolean
isLOB
(int displayType) Returns true if DisplayType is a Large Objectstatic boolean
isLookup
(int displayType) Returns true if DisplayType is a VLookup (List, Table, TableDir, Search).static boolean
isMultiID
(int displayType) static boolean
isNumeric
(int displayType) Returns true, if DisplayType is numeric (Amount, Number, Quantity, Integer).static boolean
isText
(int displayType) Returns true, if DisplayType is text (String, Text, TextLong, Memo).static boolean
isTimestampWithTimeZone
(int displayType) static boolean
isUUID
(int displayType) Returns true if UUID (TableUU, SearchUU, ..).
-
Field Details
-
String
public static final int StringDisplay Type 10 String- See Also:
-
Integer
public static final int IntegerDisplay Type 11 Integer- See Also:
-
Amount
public static final int AmountDisplay Type 12 Amount- See Also:
-
ID
public static final int IDDisplay Type 13 ID- See Also:
-
UUID
public static final int UUIDDisplay Type 200231 UUID- See Also:
-
Text
public static final int TextDisplay Type 14 Text- See Also:
-
Date
public static final int DateDisplay Type 15 Date- See Also:
-
DateTime
public static final int DateTimeDisplay Type 16 DateTime- See Also:
-
List
public static final int ListDisplay Type 17 List- See Also:
-
Table
public static final int TableDisplay Type 18 Table- See Also:
-
TableUU
public static final int TableUUDisplay Type 200233 Table- See Also:
-
TableDir
public static final int TableDirDisplay Type 19 TableDir- See Also:
-
TableDirUU
public static final int TableDirUUDisplay Type 200234- See Also:
-
YesNo
public static final int YesNoDisplay Type 20 YN- See Also:
-
Location
public static final int LocationDisplay Type 21 Location- See Also:
-
Number
public static final int NumberDisplay Type 22 Number- See Also:
-
Binary
public static final int BinaryDisplay Type 23 BLOB- See Also:
-
Time
public static final int TimeDisplay Type 24 Time- See Also:
-
Account
public static final int AccountDisplay Type 25 Account- See Also:
-
RowID
public static final int RowIDDisplay Type 26 RowID- See Also:
-
Color
public static final int ColorDisplay Type 27 Color- See Also:
-
Button
public static final int ButtonDisplay Type 28 Button- See Also:
-
Quantity
public static final int QuantityDisplay Type 29 Quantity- See Also:
-
Search
public static final int SearchDisplay Type 30 Search- See Also:
-
SearchUU
public static final int SearchUUDisplay Type 200235 Search- See Also:
-
Locator
public static final int LocatorDisplay Type 31 Locator- See Also:
-
Image
public static final int ImageDisplay Type 32 Image- See Also:
-
Assignment
public static final int AssignmentDisplay Type 33 Assignment- See Also:
-
Memo
public static final int MemoDisplay Type 34 Memo- See Also:
-
PAttribute
public static final int PAttributeDisplay Type 35 PAttribute- See Also:
-
TextLong
public static final int TextLongDisplay Type 36 CLOB- See Also:
-
CostPrice
public static final int CostPriceDisplay Type 37 CostPrice- See Also:
-
FilePath
public static final int FilePathDisplay Type 38 File Path- See Also:
-
FileName
public static final int FileNameDisplay Type 39 File Name- See Also:
-
URL
public static final int URLDisplay Type 40 URL- See Also:
-
PrinterName
public static final int PrinterNameDisplay Type 42 PrinterName- See Also:
-
Payment
public static final int PaymentDisplay Type 200012 Payment- See Also:
-
Chart
public static final int Chart- See Also:
-
DashboardContent
public static final int DashboardContent- See Also:
-
SingleSelectionGrid
public static final int SingleSelectionGrid- See Also:
-
MultipleSelectionGrid
public static final int MultipleSelectionGrid- See Also:
-
RadiogroupList
public static final int RadiogroupList- See Also:
-
ChosenMultipleSelectionList
public static final int ChosenMultipleSelectionList- See Also:
-
ChosenMultipleSelectionTable
public static final int ChosenMultipleSelectionTable- See Also:
-
ChosenMultipleSelectionSearch
public static final int ChosenMultipleSelectionSearch- See Also:
-
SchedulerState
public static final int SchedulerState- See Also:
-
RecordID
public static final int RecordID- See Also:
-
RecordUU
public static final int RecordUU- See Also:
-
JSON
public static final int JSON- See Also:
-
TimestampWithTimeZone
public static final int TimestampWithTimeZone- See Also:
-
TimeZoneId
public static final int TimeZoneId- See Also:
-
DEFAULT_TIME_FORMAT
- See Also:
-
DEFAULT_TIMESTAMP_FORMAT
- See Also:
-
DEFAULT_DATE_FORMAT
- See Also:
-
-
Constructor Details
-
DisplayType
public DisplayType()
-
-
Method Details
-
isID
public static boolean isID(int displayType) Returns true if (numeric) ID (Table, Search, Account, ..). (stored as Integer)- Parameters:
displayType
- Display Type- Returns:
- true if ID
-
isUUID
public static boolean isUUID(int displayType) Returns true if UUID (TableUU, SearchUU, ..). (stored as String)- Parameters:
displayType
- Display Type- Returns:
- true if UUID
-
isNumeric
public static boolean isNumeric(int displayType) Returns true, if DisplayType is numeric (Amount, Number, Quantity, Integer). (stored as BigDecimal)- Parameters:
displayType
- Display Type- Returns:
- true if numeric
-
getDefaultPrecision
public static int getDefaultPrecision(int displayType) Get Default Precision. Used for databases who cannot handle dynamic number precision.- Parameters:
displayType
- display type- Returns:
- scale (decimal precision)
-
isText
public static boolean isText(int displayType) Returns true, if DisplayType is text (String, Text, TextLong, Memo).- Parameters:
displayType
- Display Type- Returns:
- true if text
-
isDate
public static boolean isDate(int displayType) Returns true if DisplayType is a Date. (stored as Timestamp)- Parameters:
displayType
- Display Type- Returns:
- true if date
-
isList
public static boolean isList(int displayType) Returns true if DisplayType is a List. (stored as Text)- Parameters:
displayType
- Display Type- Returns:
- true if List
-
isLookup
public static boolean isLookup(int displayType) Returns true if DisplayType is a VLookup (List, Table, TableDir, Search). (stored as Integer or multi-ID string separated by commas) The column must have the lookup defined in AD_Reference_Value_ID- Parameters:
displayType
- Display Type- Returns:
- true if Lookup
-
isLOB
public static boolean isLOB(int displayType) Returns true if DisplayType is a Large Object- Parameters:
displayType
- Display Type- Returns:
- true if LOB
-
isTimestampWithTimeZone
public static boolean isTimestampWithTimeZone(int displayType) - Parameters:
displayType
-- Returns:
- true if displayType == TimestampWithTimeZone
-
isChosenMultipleSelection
public static boolean isChosenMultipleSelection(int displayType) - Parameters:
displayType
-- Returns:
- true if displayType is a ChosenMultipleSelection
-
isMultiID
public static boolean isMultiID(int displayType) - Parameters:
displayType
-- Returns:
- true if displayType is a multi ID string separated by commas
-
getNumberFormat
Return Format for numeric DisplayType- Parameters:
displayType
- Display Type (default Number)language
- Languagepattern
- Java Number Format pattern e.g. "#,##0.00"- Returns:
- number format
-
getNumberFormat
Return Format for numeric DisplayType- Parameters:
displayType
- Display Type (default Number)language
- Language- Returns:
- number format
-
getNumberFormat
Return Format for numeric DisplayType- Parameters:
displayType
- Display Type- Returns:
- number format
-
getDateFormat
Return Date Format- Returns:
- date format
-
getDateFormat
Return Date Format- Parameters:
language
- Language- Returns:
- date format
-
getDateFormat
Return format for date displayType- Parameters:
displayType
- Display Type- Returns:
- date format
-
getDateFormat
Return format for date displayType- Parameters:
displayType
- Display Type (default Date)language
- Language- Returns:
- date format
-
getDateFormat
Return format for date displayType- Parameters:
displayType
- Display Type (default Date)language
- Languagepattern
- Java Simple Date Format pattern e.g. "dd/MM/yy"- Returns:
- date format
-
getDateFormat_JDBC
JDBC Date Format YYYY-MM-DD- Returns:
- date format
-
getTimestampFormat_Default
JDBC Timestamp Format yyyy-mm-dd hh:mm:ss- Returns:
- timestamp format
-
getTimeFormat_Default
-
getClass
Return Storage Class. (used for MiniTable)- Parameters:
displayType
- Display TypeyesNoAsBoolean
- - yes or no as boolean- Returns:
- class Integer - BigDecimal - Timestamp - String - Boolean
-
getSQLDataType
Get SQL DataType- Parameters:
displayType
- AD_Reference_IDcolumnName
- namefieldLength
- length- Returns:
- SQL Data Type in Oracle Notation
-
getDescription
Get Description- Parameters:
displayType
- display Type- Returns:
- display type description
-
getCurrencyFormat
Helper method to get a currency format in a language (multi-currency and multi-language system)- Parameters:
langcode
- language locale codecurrencyCode
- currency code- Returns:
- number format
-