org.databene.benerator.engine.statement
Class IfStatement

java.lang.Object
  extended by org.databene.benerator.engine.statement.ConditionStatement
      extended by org.databene.benerator.engine.statement.IfStatement
All Implemented Interfaces:
java.io.Closeable, Statement

public class IfStatement
extends ConditionStatement

CompositeStatement that executes it parts only if a condition is matched.

Created: 19.02.2010 09:13:30

Since:
0.6.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.engine.statement.ConditionStatement
condition
 
Constructor Summary
IfStatement(org.databene.script.Expression<java.lang.Boolean> condition)
           
IfStatement(org.databene.script.Expression<java.lang.Boolean> condition, Statement thenStatement)
           
IfStatement(org.databene.script.Expression<java.lang.Boolean> condition, Statement thenStatement, Statement elseStatement)
           
 
Method Summary
 void close()
           
 boolean execute(BeneratorContext context)
           
 void setElseStatement(Statement elseStatement)
           
 void setThenStatement(Statement thenStatement)
           
 
Methods inherited from class org.databene.benerator.engine.statement.ConditionStatement
getCondidition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfStatement

public IfStatement(org.databene.script.Expression<java.lang.Boolean> condition)

IfStatement

public IfStatement(org.databene.script.Expression<java.lang.Boolean> condition,
                   Statement thenStatement)

IfStatement

public IfStatement(org.databene.script.Expression<java.lang.Boolean> condition,
                   Statement thenStatement,
                   Statement elseStatement)
Method Detail

execute

public boolean execute(BeneratorContext context)

setThenStatement

public void setThenStatement(Statement thenStatement)

setElseStatement

public void setElseStatement(Statement elseStatement)

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.