// Path: src/main/java/pl/exsio/nestedj/model/NestedNode.java
// public interface NestedNode<ID extends Serializable> {
// 
//     /**
//      * Standarized Field Names used internally by NestedJ.
//      * Any Java class that implements the NestedNode interface should have fields with names matching the below constants.
//      */
//     String LEFT = "treeLeft";
//     String RIGHT = "treeRight";
//     String LEVEL = "treeLevel";
//     String PARENT_ID = "parentId";
//     String ID = "id";
// 
//     /**
//      *  Should be PK if using Database.
//      *
//      * @return unique Identifier of the Entity/Object.
//      */
//     ID getId();
// 
//     /**
//      * @return Nested Set Model LEFT value
//      */
//     Long getTreeLeft();
// 
//     /**
//      * @return Nested Set Model RIGHT value
//      */
//     Long getTreeRight();
// 
//     /**
//      * @return Nested Set Model LEVEL value
//      */
//     Long getTreeLevel();
// 
//     /**
//      * Should be a FK if using Database.
//      *
//      * @return Parent Idendifier
//      */
//     ID getParentId();
// 
//     /**
//      * Sets the unique Identifier of the Entity/Object.
//      *
//      * @param id - unique Identifier of the Entity/Object.
//      */
//     void setId(ID id);
// 
//     /**
//      * Sets the Nested Set Model LEFT value
//      *
//      * @param treeLeft - Nested Set Model LEFT value
//      */
//     void setTreeLeft(Long treeLeft);
// 
//     /**
//      * Sets the Nested Set Model RIGHT value
//      *
//      * @param treeRight - Nested Set Model RIGHT value
//      */
//     void setTreeRight(Long treeRight);
// 
//     /**
//      * Sets the Nested Set Model LEVEL value
//      *
//      * @param treeLevel - Nested Set Model LEVEL value
//      */
//     void setTreeLevel(Long treeLevel);
// 
//     /**
//      * Sets the Parent Idendifier
//      *
//      * @param parent - Parent Idendifier
//      */
//     void setParentId(ID parent);
// 
// }
// 
// Path: src/main/java/pl/exsio/nestedj/model/NestedNodeInfo.java
// public class NestedNodeInfo<ID extends Serializable> {
// 
//     private final ID id;
// 
//     private final ID parentId;
// 
//     private final Long left;
// 
//     private final Long right;
// 
//     private final Long level;
// 
//     public NestedNodeInfo(ID id, ID parentId, Long left, Long right, Long level) {
//         this.id = id;
//         this.parentId = parentId;
//         this.left = left;
//         this.right = right;
//         this.level = level;
//     }
// 
//     public ID getId() {
//         return id;
//     }
// 
//     public ID getParentId() {
//         return parentId;
//     }
// 
//     public Long getLeft() {
//         return left;
//     }
// 
//     public Long getRight() {
//         return right;
//     }
// 
//     public Long getLevel() {
//         return level;
//     }
// 
//     @Override
//     public String toString() {
//         return "NestedNodeInfo{" +
//                 "id=" + id +
//                 ", parentId=" + parentId +
//                 ", left=" + left +
//                 ", right=" + right +
//                 ", level=" + level +
//                 '}';
//     }
// }


import java.io.Serializable;
import pl.exsio.nestedj.model.NestedNode;
import pl.exsio.nestedj.model.NestedNodeInfo;
/*
 *  The MIT License
 *
 *  Copyright (c) 2019 eXsio.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 *  documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 *  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *  The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 *  the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 *  BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

package pl.exsio.nestedj.delegate.query;



public interface NestedNodeMovingQueryDelegate<ID extends Serializable, N extends NestedNode<ID>> {

    Integer markNodeIds(NestedNodeInfo<ID> node);

    void updateSideFieldsUp(Long delta, Long start, Long stop, String field);

    void updateSideFieldsDown(Long delta, Long start, Long stop, String field);

    void performMoveUp(Long nodeDelta, Long levelModificator);

    void performMoveDown(Long nodeDelta, Long levelModificator);

// Path: src/main/java/pl/exsio/nestedj/model/NestedNode.java
// public interface NestedNode<ID extends Serializable> {
// 
//     /**
//      * Standarized Field Names used internally by NestedJ.
//      * Any Java class that implements the NestedNode interface should have fields with names matching the below constants.
//      */
//     String LEFT = "treeLeft";
//     String RIGHT = "treeRight";
//     String LEVEL = "treeLevel";
//     String PARENT_ID = "parentId";
//     String ID = "id";
// 
//     /**
//      *  Should be PK if using Database.
//      *
//      * @return unique Identifier of the Entity/Object.
//      */
//     ID getId();
// 
//     /**
//      * @return Nested Set Model LEFT value
//      */
//     Long getTreeLeft();
// 
//     /**
//      * @return Nested Set Model RIGHT value
//      */
//     Long getTreeRight();
// 
//     /**
//      * @return Nested Set Model LEVEL value
//      */
//     Long getTreeLevel();
// 
//     /**
//      * Should be a FK if using Database.
//      *
//      * @return Parent Idendifier
//      */
//     ID getParentId();
// 
//     /**
//      * Sets the unique Identifier of the Entity/Object.
//      *
//      * @param id - unique Identifier of the Entity/Object.
//      */
//     void setId(ID id);
// 
//     /**
//      * Sets the Nested Set Model LEFT value
//      *
//      * @param treeLeft - Nested Set Model LEFT value
//      */
//     void setTreeLeft(Long treeLeft);
// 
//     /**
//      * Sets the Nested Set Model RIGHT value
//      *
//      * @param treeRight - Nested Set Model RIGHT value
//      */
//     void setTreeRight(Long treeRight);
// 
//     /**
//      * Sets the Nested Set Model LEVEL value
//      *
//      * @param treeLevel - Nested Set Model LEVEL value
//      */
//     void setTreeLevel(Long treeLevel);
// 
//     /**
//      * Sets the Parent Idendifier
//      *
//      * @param parent - Parent Idendifier
//      */
//     void setParentId(ID parent);
// 
// }
// 
// Path: src/main/java/pl/exsio/nestedj/model/NestedNodeInfo.java
// public class NestedNodeInfo<ID extends Serializable> {
// 
//     private final ID id;
// 
//     private final ID parentId;
// 
//     private final Long left;
// 
//     private final Long right;
// 
//     private final Long level;
// 
//     public NestedNodeInfo(ID id, ID parentId, Long left, Long right, Long level) {
//         this.id = id;
//         this.parentId = parentId;
//         this.left = left;
//         this.right = right;
//         this.level = level;
//     }
// 
//     public ID getId() {
//         return id;
//     }
// 
//     public ID getParentId() {
//         return parentId;
//     }
// 
//     public Long getLeft() {
//         return left;
//     }
// 
//     public Long getRight() {
//         return right;
//     }
// 
//     public Long getLevel() {
//         return level;
//     }
// 
//     @Override
//     public String toString() {
//         return "NestedNodeInfo{" +
//                 "id=" + id +
//                 ", parentId=" + parentId +
//                 ", left=" + left +
//                 ", right=" + right +
//                 ", level=" + level +
//                 '}';
//     }
// }


// Path: src/main/java/pl/exsio/nestedj/delegate/query/NestedNodeMovingQueryDelegate.java
import java.io.Serializable;
import pl.exsio.nestedj.model.NestedNode;
import pl.exsio.nestedj.model.NestedNodeInfo;

/*
 *  The MIT License
 *
 *  Copyright (c) 2019 eXsio.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 *  documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 *  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *  The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 *  the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 *  BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

package pl.exsio.nestedj.delegate.query;



public interface NestedNodeMovingQueryDelegate<ID extends Serializable, N extends NestedNode<ID>> {

    Integer markNodeIds(NestedNodeInfo<ID> node);

    void updateSideFieldsUp(Long delta, Long start, Long stop, String field);

    void updateSideFieldsDown(Long delta, Long start, Long stop, String field);

    void performMoveUp(Long nodeDelta, Long levelModificator);

    void performMoveDown(Long nodeDelta, Long levelModificator);

    void updateParentField(ID newParentId, NestedNodeInfo<ID> node);