public class RuleDAO extends AbstractDAO
Constructor and Description |
---|
RuleDAO(java.sql.Connection conn, NFEModel model)
Creates a RuleDAO with the specified connection and model.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteDanglingRuleFeatureRel(NFEFeatureLayerMetadata metadata)
Deletes the rules elements that are not referencing existing features from the specified feature layer.
|
void |
deletePointDefaultAttributes(NFELineLineRule llRule) |
void |
deleteRuleInstanceRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations)
Deletes the specified feature rule relations from the tables FT_RULE_REL_[model_id].
|
void |
deleteRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances)
Deletes the specified rule instances from the tables RULE_INSTANCE_[model_id].
|
void |
deleteRules(java.util.Collection<? extends NFEConnectivityRule> rules)
Deletes the specified rules from the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].
|
java.util.List<NFECardinalityRule> |
getCardinalityRules()
Returns the model's cardinality rules from the table POINT_CARD_RULE_[model_id].
|
java.util.List<NFELineLineRule> |
getLineLineRules(java.util.Collection<NFELinePointRule> linePointRules)
Returns the model's line line rules from the table LINE_LINE_RULE_[model_id].
|
java.util.List<NFELinePointRule> |
getLinePointRules()
Returns the model's line point rules from the table LINE_POINT_RULE_[model_id].
|
boolean |
hasAnyRuleInstanceAssociated(NFEConnectivityRule rule)
Returns true if any rule instance is related to the specified rule in the table RULE_INSTANCE_[model_id], false otherwise.
|
long |
registerRuleHandler(java.lang.String handlerFQClassName, NFEConnectivityRule.ConnectivityRuleType ruleType)
Saves the rule handler for the specified rule.
|
void |
saveRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances)
Persists the new rule instances in the table RULE_INSTANCE_[model_id].
|
void |
saveRuleInstancesRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations)
Persists the new feature rule relations in the table FT_RULE_REL_[model_id].
|
void |
saveRules(java.util.Collection<? extends NFEConnectivityRule> rules)
Persists the new rules in the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].
|
void |
updateRules(java.util.Collection<? extends NFEConnectivityRule> rules)
Updates the specified rules in the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].
|
getConnection, getModel, getSQLValidator
public RuleDAO(java.sql.Connection conn, NFEModel model)
conn
- connectionmodel
- modelpublic void saveRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
rules
- new rules to persistNFEIOException
- if an NFE error occurs.public void deletePointDefaultAttributes(NFELineLineRule llRule) throws NFEIOException
NFEIOException
public void updateRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
rules
- rules to updateNFEIOException
- if an NFE error occurs.public void deleteRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
rules
- rules to deleteNFEIOException
- if an NFE error occurs.public java.util.List<NFELinePointRule> getLinePointRules() throws NFEIOException
NFEIOException
- if an NFE error occurs.public java.util.List<NFELineLineRule> getLineLineRules(java.util.Collection<NFELinePointRule> linePointRules) throws NFEIOException
linePointRules
- the model line point rules. Those rules will be set to the line line rules.NFEIOException
- if an NFE error occurs.public boolean hasAnyRuleInstanceAssociated(NFEConnectivityRule rule) throws NFEIOException
rule
- ruleNFEIOException
- if an NFE error occurs.public java.util.List<NFECardinalityRule> getCardinalityRules() throws NFEIOException
NFEIOException
- if an NFE error occurs.public void deleteDanglingRuleFeatureRel(NFEFeatureLayerMetadata metadata) throws NFEIOException
metadata
- feature layer metadataNFEIOException
- if an NFE error occurs.public void deleteRuleInstanceRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations) throws NFEIOException
ruleInstanceRelations
- feature rule relations to deleteNFEIOException
- if an NFE error occurs.public void saveRuleInstancesRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations) throws NFEIOException
ruleInstanceRelations
- new feature rule relations to persistNFEIOException
- if an NFE error occurs.public void saveRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances) throws NFEIOException
ruleInstances
- new rule instances to persistNFEIOException
- if an NFE error occurs.public long registerRuleHandler(java.lang.String handlerFQClassName, NFEConnectivityRule.ConnectivityRuleType ruleType) throws NFEIOException
handlerFQClassName
- rule handler full qualified class nameNFEIOException
- if an NFE error occurs.public void deleteRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances) throws NFEIOException
ruleInstances
- rule instances to deleteNFEIOException
- if an NFE error occurs.