public class DataAccessMethod extends Named
Constructor and Description |
---|
DataAccessMethod(java.lang.String name,
ArgumentContent output,
boolean acceptquerycondition)
Create a data access method specifying the output
|
DataAccessMethod(java.lang.String name,
ArgumentContent output,
boolean acceptquerycondition,
boolean masstreatment)
Create a data access method
|
Modifier and Type | Method and Description |
---|---|
void |
addInputArgument(MethodArgument argument) |
java.lang.String |
generateMethodArguments(boolean securityarguments)
generates the method unitary arguments, with potentially security arguments
|
java.lang.String |
generateMethodArgumentsForMassive()
generates the methods arguments for massive processing
|
java.lang.String |
generateMethodInternalArguments(Property<?> thisproperty,
java.lang.String classname,
boolean startwithcomma)
generates the method internal argument for unitary processing to be used for
code generation
|
java.lang.String |
generateMethodInternalArgumentsForMassive(Property<?> thisproperty,
java.lang.String classname,
boolean startwithcomma)
generates the method internal argument for massive
|
java.lang.String |
generateMethodInternalArgumentsForMassive(Property<?> thisproperty,
java.lang.String classname,
boolean startwithcomma,
boolean definitionstuff)
generates the method internal argument for massive to be used for code
generation
|
java.lang.String |
generateMethodPassThroughArguments()
generates the arguments for arguments pass-through.
|
MethodArgument |
getImplicitobjectmethod() |
MethodArgument |
getInputArgument(int index)
gets the input agument at the given index
|
int |
getInputAttributeNumber() |
ArgumentContent |
getoutputargument() |
boolean |
isAcceptquerycondition() |
boolean |
isMassive() |
boolean |
isStatic()
A method should be static if it does not have a single object as an input
attribute
|
boolean |
needPropertyExtractor() |
void |
setNeedForPropertyExtractor()
sets that the data access method needs a property extractor
|
changeName, cleanName, equals, getName
public DataAccessMethod(java.lang.String name, ArgumentContent output, boolean acceptquerycondition)
name
- name of the method. Should be unique amongst all
method properties of the applicationoutput
- output of the methodacceptquerycondition
- specifies if the method accepts an additional
query condition method (example: a select does
not "start" from an object)public DataAccessMethod(java.lang.String name, ArgumentContent output, boolean acceptquerycondition, boolean masstreatment)
name
- name of the method. Should be unique amongst all
method properties of the applicationoutput
- output of the methodacceptquerycondition
- specifies if the method accepts an additional
query condition method (example: a select does
not "start" from an object)masstreatment
- true if mass treatment is implemented for this
method. Mass treatment allows to treat
efficiently a batch of objectspublic boolean isAcceptquerycondition()
public boolean needPropertyExtractor()
public void setNeedForPropertyExtractor()
public boolean isMassive()
public MethodArgument getImplicitobjectmethod()
public void addInputArgument(MethodArgument argument)
argument
- adds an input argumentpublic boolean isStatic()
public ArgumentContent getoutputargument()
public int getInputAttributeNumber()
public MethodArgument getInputArgument(int index)
index
- an integer between 0 (included) and getInputAttributeNumber
(excluded)public java.lang.String generateMethodInternalArgumentsForMassive(Property<?> thisproperty, java.lang.String classname, boolean startwithcomma)
thisproperty
- relevant property (parent)classname
- class name of the data objectstartwithcomma
- if true, start with a comma (if there is another
argument before)public java.lang.String generateMethodInternalArgumentsForMassive(Property<?> thisproperty, java.lang.String classname, boolean startwithcomma, boolean definitionstuff)
thisproperty
- relevant property (parent)classname
- class name of the data objectstartwithcomma
- if true, start with a comma (if there is another
argument before)definitionstuff
- true if part of object definition, false if part of
object run-timepublic java.lang.String generateMethodInternalArguments(Property<?> thisproperty, java.lang.String classname, boolean startwithcomma)
thisproperty
- relevant property (parent)classname
- class name of the data objectstartwithcomma
- if true, start with a comma (if there is anotherpublic java.lang.String generateMethodArgumentsForMassive()
public java.lang.String generateMethodPassThroughArguments()
public java.lang.String generateMethodArguments(boolean securityarguments)
securityarguments
- if true, generates with security arguments