line.substring( 0,
modifyBlockEnd ).trim() :
line;
}
if ( modifyBlockEnd >= 0 ) {
ActionUpdateField action = new ActionUpdateField();
action.setVariable( modifiedVariable );
m.addRhsItem( action );
addModifiersToAction( modifiers,
action,
boundParams,
dmo,
m.getImports(),
isJavaDialect );
modifiedVariable = null;
modifiers = null;
}
} else if ( line.startsWith( "insertLogical" ) ) {
String fact = unwrapParenthesis( line );
String type = getStatementType( fact,
factsType );
if ( type != null ) {
ActionInsertLogicalFact action = new ActionInsertLogicalFact( type );
m.addRhsItem( action );
if ( factsType.containsKey( fact ) ) {
addSettersToAction( setStatements,
fact,
action,
boundParams,
dmo,
m.getImports(),
isJavaDialect );
}
}
} else if ( line.startsWith( "insert" ) ) {
String fact = unwrapParenthesis( line );
String type = getStatementType( fact,
factsType );
if ( type != null ) {
ActionInsertFact action = new ActionInsertFact( type );
m.addRhsItem( action );
if ( factsType.containsKey( fact ) ) {
action.setBoundName( fact );
addSettersToAction( setStatements,
fact,
action,
boundParams,
dmo,
m.getImports(),
isJavaDialect );
}
}
} else if ( line.startsWith( "update" ) ) {
String variable = unwrapParenthesis( line );
ActionUpdateField action = new ActionUpdateField();
action.setVariable( variable );
m.addRhsItem( action );
addSettersToAction( setStatements,
variable,
action,
boundParams,
dmo,
m.getImports(),
isJavaDialect );
} else if ( line.startsWith( "modify" ) ) {
int modifyBlockEnd = line.lastIndexOf( '}' );
if ( modifyBlockEnd > 0 ) {
String variable = line.substring( line.indexOf( '(' ) + 1,
line.indexOf( ')' ) ).trim();
ActionUpdateField action = new ActionUpdateField();
action.setVariable( variable );
m.addRhsItem( action );
addModifiersToAction( line.substring( line.indexOf( '{' ) + 1,
modifyBlockEnd ).trim(),
action,
boundParams,