Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2014-2015 the original author or authors.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  * either express or implied. See the License for the specific language
  * governing permissions and limitations under the License.
  */
 package org.dbflute.cbean.ckey;
 
 import java.util.List;
 
The condition-key of lessThan.

Author(s):
jflute
 
 public class ConditionKeyLessThan extends ConditionKey {
 
     // ===================================================================================
     //                                                                          Definition
     //                                                                          ==========
     
The serial version UID for object serialization. (Default)
 
     private static final long serialVersionUID = 1L;
 
     // ===================================================================================
     //                                                                         Constructor
     //                                                                         ===========
     protected ConditionKeyLessThan() {
         initializeConditionKey();
         initializeOperand();
     }
 
     protected void initializeConditionKey() {
          = "lessThan";
     }
 
     protected void initializeOperand() {
          = "<";
     }
 
     // ===================================================================================
     //                                                                Prepare Registration
     //                                                                ====================
     @Override
     protected ConditionKeyPrepareResult doPrepareQuery(ConditionValue cvalueObject value) {
         if (value == null) {
             return ;
         }
         if (needsOverrideValue(cvalue)) {
             cvalue.overrideLessThan(value);
             return chooseResultAlreadyExists(cvalue.equalLessThan(value));
         }
         return ;
     }
 
     // ===================================================================================
     //                                                                      Override Check
     //                                                                      ==============
     @Override
     public boolean needsOverrideValue(ConditionValue cvalue) {
         return cvalue.isFixedQuery() && cvalue.hasLessThan();
     }
 
     // ===================================================================================
     //                                                                        Where Clause
     //                                                                        ============
     @Override
     protected void doAddWhereClause(List<QueryClauseconditionListColumnRealName columnRealNameConditionValue value,
             ColumnFunctionCipher cipherConditionOption option) {
         conditionList.add(buildBindClause(columnRealNamevalue.getLessThanLatestLocation(), cipheroption));
     }
 
     // ===================================================================================
     //                                                                     Condition Value
     //                                                                     ===============
     @Override
     protected void doSetupConditionValue(ConditionValue cvalueObject valueString locationConditionOption option) {
         cvalue.setupLessThan(valuelocation);
     }
 
     // ===================================================================================
     //                                                                       Null-able Key
     //                                                                       =============
     @Override
     public boolean isNullaleKey() {
         return false;
    }
New to GrepCode? Check out our FAQ X