throws VirtualMachineException
{
final int id = checkMethod( methodName, args );
if( id != -1 )
{
final Row row = (Row) target.getAttachment( "row" );
if( row != null )
{
try
{
switch( id )
{
case GET_STATUS:
return Conversor.toInstance(
getVirtualMachine(),
new Byte( row.getStatus() )
);
case GET_ID:
return Conversor.toInstance(
getVirtualMachine(),
new Long( row.getId() )
);
case GET_VERSION:
return Conversor.toInstance(
getVirtualMachine(),
new Integer( row.getVersion() )
);
case GET_RECORD_ID:
return Conversor.toInstance(
getVirtualMachine(),
row.getRecordId()
);
case IS_SENT:
return Conversor.toInstance(
getVirtualMachine(),
row.isSent() ?
CoreConstants.TRUE :
CoreConstants.FALSE
);
case GET_PARENT:
return (Instance) target.getAttachment( "table" );
case GET_FIELD:
{
final Object locator = getLocator( args[0] );
Object value = null;
if( locator != null )
{
if( locator instanceof String )
{
value = row.getField( (String) locator );
}
else
{
value = row.getField(
((Integer) locator).intValue()
);
}
}
return Conversor.toInstance(
getVirtualMachine(),
value
);
}
case IS_DIRTY:
return Conversor.toInstance(
getVirtualMachine(),
row.isDirty() ?
CoreConstants.TRUE :
CoreConstants.FALSE
);
case GET_FIELD_COUNT:
return Conversor.toInstance(
getVirtualMachine(),
new Integer( row.getFieldCount() )
);
case GET_FIELD_NAME:
return Conversor.toInstance(
getVirtualMachine(),
row.getFieldName( Conversor.toInteger(
args[0].get( "value" )
).intValue() )
);
case EQUALS:
return Conversor.toInstance(
getVirtualMachine(),
row.equals(
args[0].get( "value" )
) ? CoreConstants.TRUE : CoreConstants.FALSE
);
case HASH_CODE:
return Conversor.toInstance(
getVirtualMachine(),
new Integer( row.hashCode() )
);
case TO_STRING:
return Conversor.toInstance(
getVirtualMachine(),
row.toString()
);
case CLONE_ROW:
{
final Row r = row.cloneRow();
final Instance i =
getVirtualMachine().newInstance( "Row" );
i.setAttachment( "row", row );
i.setAttachment(
"parent",