Package org.compiere.model
Class DataStatusEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.compiere.model.DataStatusEvent
-
- All Implemented Interfaces:
Serializable
public final class DataStatusEvent extends EventObject implements Serializable
Data Status EventIndicates 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataStatusEvent(Object source1, int totalRows, boolean changed, boolean autoSave, boolean inserting)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAD_Message()
Get Message Infoint
getChangedColumn()
Get Changed ColumnString
getColumnName()
Get Column Nameint
getCurrentRow()
Get current row (zero based)String
getInfo()
Get Message Infoint
getLoadedRows()
Get loaded rowsString
getMessage()
String representation of Status.int
getTotalRows()
Get total rowsboolean
isChanged()
Is Data Changedboolean
isConfirmed()
Is Confirmed (e.g. user has seen it)boolean
isEqual(DataStatusEvent e)
boolean
isError()
Is this an errorboolean
isFirstRow()
Is First Row - (zero based)boolean
isInitEdit()
boolean
isInserting()
Are we insertingboolean
isLastRow()
Is Last Row - (zero based)boolean
isLoading()
Is loadingboolean
isWarning()
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
setInfo(String AD_Message, String info, boolean isError, boolean isWarning)
Set Message Infovoid
setInserting(boolean inserting)
Set Insertingvoid
setIsInitEdit(boolean isInitEdit)
void
setLoading(int loadedRows)
Set Loaded InfoString
toString()
String representation of Status.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
Created
public Timestamp Created
Created
-
CreatedBy
public Integer CreatedBy
Created By
-
Updated
public Timestamp Updated
Updated
-
UpdatedBy
public Integer UpdatedBy
Updated By
-
Info
public String Info
Info
-
AD_Table_ID
public int AD_Table_ID
Table ID
-
Record_ID
public Object Record_ID
Record ID
-
-
Constructor Detail
-
DataStatusEvent
public DataStatusEvent(Object source1, int totalRows, boolean changed, boolean autoSave, boolean inserting)
Constructor- Parameters:
source1
- sourcetotalRows
- total rowschanged
- changedautoSave
- auto saveinserting
- inserting
-
-
Method Detail
-
setLoading
public void setLoading(int loadedRows)
Set Loaded 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 roe
-
getTotalRows
public int getTotalRows()
Get total rows- Returns:
- total rows
-
setInfo
public void setInfo(String AD_Message, String info, boolean isError, boolean isWarning)
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()
Are we inserting- Returns:
- true if inserting
-
getAD_Message
public String getAD_Message()
Get Message Info- Returns:
- Message
-
getInfo
public String getInfo()
Get Message Info- Returns:
- Info
-
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
public String toString()
String representation of Status.- Overrides:
toString
in classEventObject
- Returns:
- Examples: +*1?/20 1/256->2000
-
getMessage
public String 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
public void setChangedColumn(int col, String columnName)
Set Changed Column- Parameters:
col
- columncolumnName
- column name
-
getChangedColumn
public int getChangedColumn()
Get Changed Column- Returns:
- changed column
-
getColumnName
public String 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
public boolean isEqual(DataStatusEvent e)
-
isInitEdit
public boolean isInitEdit()
- Returns:
- indicate this event is by user start edit this field but not yet complete edit
-
setIsInitEdit
public void setIsInitEdit(boolean isInitEdit)
- Parameters:
isInitEdit
- indicate this event is by user start edit this field but not yet complete edit
-
-