public class RestrictionModel
extends java.lang.Object
DataModel
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IGNORE
"ignore the association" - restriction.
|
Constructor and Description |
---|
RestrictionModel(DataModel dataModel,
ExecutionContext executionContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRestriction(Association association,
java.lang.String condition,
java.lang.String location,
boolean removePreviousRestriction,
java.util.Map<java.lang.String,java.lang.String> parameters)
Adds a restriction to a association.
|
void |
addRestriction(Association association,
java.lang.String condition,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> parameters)
Adds a restriction to a association.
|
void |
addRestrictionDefinition(CsvFile csvFile,
java.lang.String fileName,
java.util.Map<java.lang.String,java.lang.String> parameters)
Adds restrictions defined in a restriction-file.
|
void |
addRestrictionDefinition(java.net.URL extractionModelURL,
java.util.Map<java.lang.String,java.lang.String> parameters)
Adds restrictions defined in a restriction-file.
|
java.lang.String |
getRestriction(Association association)
Gets the restriction (in SQL) for an association.
|
boolean |
isTransposed()
Is the restriction-model transposed?
|
java.lang.String |
toString()
Stringifies the restriction model.
|
void |
transpose()
Transposes the restriction-model.
|
public static final java.lang.String IGNORE
public RestrictionModel(DataModel dataModel, ExecutionContext executionContext)
dataModel
- the data-modelpublic void transpose()
public boolean isTransposed()
public java.lang.String getRestriction(Association association)
association
- the associationnull
if association is not restricted.
IGNORE
if association must be ignored.public void addRestrictionDefinition(java.net.URL extractionModelURL, java.util.Map<java.lang.String,java.lang.String> parameters) throws java.lang.Exception
parameters
- apply this parameter-value mapping to all restriction conditionsjava.lang.Exception
public void addRestrictionDefinition(CsvFile csvFile, java.lang.String fileName, java.util.Map<java.lang.String,java.lang.String> parameters) throws java.lang.Exception
parameters
- apply this parameter-value mapping to all restriction conditionsfileName
- java.lang.Exception
public void addRestriction(Association association, java.lang.String condition, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> parameters)
association
- the associationcondition
- the restriction-conditionparameters
- apply this parameter-value mapping to all restriction conditionslocation
- location in CSV-filepublic void addRestriction(Association association, java.lang.String condition, java.lang.String location, boolean removePreviousRestriction, java.util.Map<java.lang.String,java.lang.String> parameters)
association
- the associationcondition
- the restriction-conditionlocation
- location in CSV-fileparameters
- apply this parameter-value mapping to all restriction conditionsremovePreviousRestriction
- if true
, remove any restriction on the association before adding the new onepublic java.lang.String toString()
toString
in class java.lang.Object