Class RuleDAO
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
-
- oracle.spatial.network.nfe.io.jdbc.dao.RuleDAO
-
public class RuleDAO extends AbstractDAO
The RuleDAO data access object provides methods to load, create and manage the NFE rules. It is not recommended to use the data access objects methods, instead use the NFE services.
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
conn
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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].-
Methods inherited from class oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
close, close, execute, execute, executeQuery, executeUpdate, getConnection, getModel, getSQLValidator
-
-
-
-
Constructor Detail
-
RuleDAO
public RuleDAO(java.sql.Connection conn, NFEModel model)
Creates a RuleDAO with the specified connection and model.- Parameters:
conn
- connectionmodel
- model
-
-
Method Detail
-
saveRules
public void saveRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
Persists the new rules in the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].- Parameters:
rules
- new rules to persist- Throws:
NFEIOException
- if an NFE error occurs.
-
deletePointDefaultAttributes
public void deletePointDefaultAttributes(NFELineLineRule llRule) throws NFEIOException
- Throws:
NFEIOException
-
updateRules
public void updateRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
Updates the specified rules in the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].- Parameters:
rules
- rules to update- Throws:
NFEIOException
- if an NFE error occurs.
-
deleteRules
public void deleteRules(java.util.Collection<? extends NFEConnectivityRule> rules) throws NFEIOException
Deletes the specified rules from the tables LINE_LINE_RULE_[model_id] and LINE_POINT_RULE_[model_id].- Parameters:
rules
- rules to delete- Throws:
NFEIOException
- if an NFE error occurs.
-
getLinePointRules
public java.util.List<NFELinePointRule> getLinePointRules() throws NFEIOException
Returns the model's line point rules from the table LINE_POINT_RULE_[model_id].- Returns:
- the model's line point rules
- Throws:
NFEIOException
- if an NFE error occurs.
-
getLineLineRules
public java.util.List<NFELineLineRule> getLineLineRules(java.util.Collection<NFELinePointRule> linePointRules) throws NFEIOException
Returns the model's line line rules from the table LINE_LINE_RULE_[model_id].- Parameters:
linePointRules
- the model line point rules. Those rules will be set to the line line rules.- Returns:
- the model's line line rules
- Throws:
NFEIOException
- if an NFE error occurs.
-
hasAnyRuleInstanceAssociated
public boolean hasAnyRuleInstanceAssociated(NFEConnectivityRule rule) throws NFEIOException
Returns true if any rule instance is related to the specified rule in the table RULE_INSTANCE_[model_id], false otherwise.- Parameters:
rule
- rule- Returns:
- true if any rule instance is related to the specified rule in the table RULE_INSTANCE_[model_id], false otherwise
- Throws:
NFEIOException
- if an NFE error occurs.
-
getCardinalityRules
public java.util.List<NFECardinalityRule> getCardinalityRules() throws NFEIOException
Returns the model's cardinality rules from the table POINT_CARD_RULE_[model_id].- Returns:
- the model's cardinality rules from the table POINT_CARD_RULE_[model_id]
- Throws:
NFEIOException
- if an NFE error occurs.
-
deleteDanglingRuleFeatureRel
public void deleteDanglingRuleFeatureRel(NFEFeatureLayerMetadata metadata) throws NFEIOException
Deletes the rules elements that are not referencing existing features from the specified feature layer.- Parameters:
metadata
- feature layer metadata- Throws:
NFEIOException
- if an NFE error occurs.
-
deleteRuleInstanceRelations
public void deleteRuleInstanceRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations) throws NFEIOException
Deletes the specified feature rule relations from the tables FT_RULE_REL_[model_id].- Parameters:
ruleInstanceRelations
- feature rule relations to delete- Throws:
NFEIOException
- if an NFE error occurs.
-
saveRuleInstancesRelations
public void saveRuleInstancesRelations(java.util.Collection<NFERuleInstanceRelation> ruleInstanceRelations) throws NFEIOException
Persists the new feature rule relations in the table FT_RULE_REL_[model_id].- Parameters:
ruleInstanceRelations
- new feature rule relations to persist- Throws:
NFEIOException
- if an NFE error occurs.
-
saveRuleInstances
public void saveRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances) throws NFEIOException
Persists the new rule instances in the table RULE_INSTANCE_[model_id].- Parameters:
ruleInstances
- new rule instances to persist- Throws:
NFEIOException
- if an NFE error occurs.
-
registerRuleHandler
public long registerRuleHandler(java.lang.String handlerFQClassName, NFEConnectivityRule.ConnectivityRuleType ruleType) throws NFEIOException
Saves the rule handler for the specified rule.- Parameters:
handlerFQClassName
- rule handler full qualified class name- Throws:
NFEIOException
- if an NFE error occurs.
-
deleteRuleInstances
public void deleteRuleInstances(java.util.Collection<NFERuleInstance> ruleInstances) throws NFEIOException
Deletes the specified rule instances from the tables RULE_INSTANCE_[model_id].- Parameters:
ruleInstances
- rule instances to delete- Throws:
NFEIOException
- if an NFE error occurs.
-
-