Methods Summary |
---|
public boolean | equals(java.lang.Object rhs)
boolean equal = false;
if ( this == rhs )
{
equal = true;
}
else if ( rhs instanceof LogQueryEntry )
{
final LogQueryEntry e = (LogQueryEntry)rhs;
equal = ArrayUtil.arraysEqual( getFields(), e.getFields() );
}
return equal;
|
public java.util.Date | getDate()
return mDate;
|
public java.lang.Object[] | getFields()
final Object[] fields = new Object[ NUM_FIELDS ];
fields[ RECORD_NUMBER_INDEX ] = mRecordNumber;
fields[ DATE_INDEX ] = mDate;
fields[ LEVEL_INDEX ] = mLevel;
fields[ PRODUCT_NAME_INDEX ] = mProductName;
fields[ MESSAGE_ID_INDEX ] = mMessageID;
fields[ MODULE_INDEX ] = mModule;
fields[ MESSAGE_INDEX ] = mMessage;
fields[ NAME_VALUE_PAIRS_INDEX ]= mNameValuePairs;
return fields;
|
public java.lang.String | getLevel()
return mLevel;
|
public java.lang.String | getMessage()
return mMessage;
|
public java.lang.String | getMessageID()
return mMessageID;
|
public java.lang.String | getModule()
return mModule;
|
public java.lang.String | getNameValuePairs()
return mNameValuePairs;
|
public java.util.Map | getNameValuePairsMap()
if ( mNameValuePairsMap == null )
{
mNameValuePairsMap = parseNameValuePairs();
}
return mNameValuePairsMap;
|
public java.lang.String | getObjectName()
return getNameValuePairsMap().get( OBJECTNAME_KEY );
|
public java.lang.String | getProductName()
return mProductName;
|
public long | getRecordNumber()
return mRecordNumber;
|
public java.lang.String | getThreadID()
return getNameValuePairsMap().get( THREAD_ID_KEY );
|
public int | hashCode()
return ObjectUtil.hashCode( mDate, mLevel,
mProductName, mMessage, mMessageID, mModule, mNameValuePairs) ^
ObjectUtil.hashCode( mRecordNumber );
|
private java.util.Map | parseNameValuePairs()
final String src = getNameValuePairs();
final Map<String,String> m = new HashMap<String,String>();
final String[] pairs = src.split( NVP_PAIRS_DELIM );
for( String pair : pairs )
{
final int idx = pair.indexOf( PAIR_DELIM );
if ( idx < 0 )
{
throw new IllegalArgumentException( src );
}
final String name = pair.substring( 0, idx ).trim();
final String value = pair.substring( idx + 1, pair.length() ).trim();
m.put( name, value );
}
return m;
|
public java.lang.String | toString()
final String D = "|";
// [#|DATE|LEVEL|PRODUCT_NAME|MODULE|NAME_VALUE_PAIRS|MESSAGE|#]
return "[#" +
getRecordNumber() + D +
getDate() + D +
getLevel() + D +
getProductName() + D +
getModule() + D +
getNameValuePairs() + D +
getMessage() + D +
getMessageID() + D +
"]";
|