Package org.compiere.model
Class DataStatusEvent
java.lang.Object
java.util.EventObject
org.compiere.model.DataStatusEvent
- All Implemented Interfaces:
Serializable
Data Status Event
Indicates the current Status of the database
- Version:
- $Id: DataStatusEvent.java,v 1.4 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionint
Table IDCreatedCreated ByInfoRecord IDUpdatedUpdated ByFields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionDataStatusEvent
(Object source1, int totalRows, boolean changed, boolean autoSave, boolean inserting) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet AD Messageint
Get Changed ColumnGet Column Nameint
Get current row (zero based)getInfo()
Get info for AD Messageint
Get loaded rowsString representation of Status.int
Get total rowsboolean
Is Data Changedboolean
Is Confirmed (e.g. user has seen it)boolean
boolean
isError()
Is this an errorboolean
Is First Row - (zero based)boolean
boolean
boolean
Is Last Row - (zero based)boolean
Is loadingboolean
Is this a warningvoid
setChangedColumn
(int col, String columnName) Set Changed Columnvoid
setConfirmed
(boolean confirmed) Set Confirmed togglevoid
setCurrentRow
(int currentRow) Set current Row (zero based)void
Set Message Infovoid
setInserting
(boolean inserting) Set Insertingvoid
setIsInitEdit
(boolean isInitEdit) void
setLoading
(int loadedRows) Set Loading InfotoString()
String representation of Status.Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
Created
Created -
CreatedBy
Created By -
Updated
Updated -
UpdatedBy
Updated By -
Info
Info -
AD_Table_ID
public int AD_Table_IDTable ID -
Record_ID
Record ID
-
-
Constructor Details
-
DataStatusEvent
public DataStatusEvent(Object source1, int totalRows, boolean changed, boolean autoSave, boolean inserting) Constructor- Parameters:
source1
- sourcetotalRows
- total rowschanged
- changedautoSave
- auto saveinserting
- inserting
-
-
Method Details
-
setLoading
public void setLoading(int loadedRows) Set Loading Info- Parameters:
loadedRows
- loaded rows
-
isLoading
public boolean isLoading()Is loading- Returns:
- true if loading
-
getLoadedRows
public int getLoadedRows()Get loaded rows- Returns:
- loaded rows
-
setCurrentRow
public void setCurrentRow(int currentRow) Set current Row (zero based)- Parameters:
currentRow
- current row
-
getCurrentRow
public int getCurrentRow()Get current row (zero based)- Returns:
- current row
-
getTotalRows
public int getTotalRows()Get total rows- Returns:
- total number of rows
-
setInfo
Set Message Info- Parameters:
AD_Message
- messageinfo
- infoisError
- errorisWarning
- true if warning
-
setInserting
public void setInserting(boolean inserting) Set Inserting- Parameters:
inserting
- inserting
-
isInserting
public boolean isInserting()- Returns:
- true if inserting
-
getAD_Message
Get AD Message- Returns:
- AD Message
-
getInfo
Get info for AD Message- Returns:
- info for AD Message
-
isError
public boolean isError()Is this an error- Returns:
- true if error
-
isWarning
public boolean isWarning()Is this a warning- Returns:
- true if warning
-
toString
String representation of Status.- Overrides:
toString
in classEventObject
- Returns:
- Examples: +*1?/20 1/256->2000
-
getMessage
String representation of Status.*1/20 Change - automatic commit ?1/20 Change - manual confirm 1/56->200 Loading 1/20 Normal +*1/20 Inserting, changed - automatic commit The row number is converted from zero based representation
- Returns:
- Status info
-
isChanged
public boolean isChanged()Is Data Changed- Returns:
- true if changed
-
isFirstRow
public boolean isFirstRow()Is First Row - (zero based)- Returns:
- true if first row
-
isLastRow
public boolean isLastRow()Is Last Row - (zero based)- Returns:
- true if last row
-
setChangedColumn
Set Changed Column- Parameters:
col
- column indexcolumnName
- column name
-
getChangedColumn
public int getChangedColumn()Get Changed Column- Returns:
- changed column index
-
getColumnName
Get Column Name- Returns:
- column name
-
setConfirmed
public void setConfirmed(boolean confirmed) Set Confirmed toggle- Parameters:
confirmed
- confirmed
-
isConfirmed
public boolean isConfirmed()Is Confirmed (e.g. user has seen it)- Returns:
- true if confirmed
-
isEqual
- Parameters:
e
-- Returns:
- true if equal with e
-
isInitEdit
public boolean isInitEdit()- Returns:
- true if this event is by user start edit this field but not yet completed edit
-
setIsInitEdit
public void setIsInitEdit(boolean isInitEdit) - Parameters:
isInitEdit
- indicate this event is by user start edit this field but not yet completed edit
-