![JAR search and dependency download from the Maven repository](/logo.png)
com.jk.data.dynamic.query.Operator Maven / Gradle / Ivy
/*
* Copyright 2002-2022 Dr. Jalal Kiswani.
* Email: [email protected]
* Check out https://smart-api.com for more details
*
* All the opensource projects of Dr. Jalal Kiswani are free for personal and academic use only,
* for commercial usage and support, please contact the author.
*
* 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 com.jk.data.dynamic.query;
// TODO: Auto-generated Javadoc
/**
* The Class Operator.
*/
public class Operator implements QueryComponent {
/** The Constant EQUAL. */
public static final Operator EQUAL = new Operator("=");
/** The Constant COMMA. */
public static final Operator COMMA = new Operator(",");
/** The Constant MORE_THAN. */
public static final Operator MORE_THAN = new Operator(">");
/** The Constant LESS_THAN. */
public static final Operator LESS_THAN = new Operator("<");
/** The name. */
String name;
/**
* Instantiates a new operator.
*
* @param name the name
*/
public Operator(final String name) {
this.name = name;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Checks if is inline.
*
* @return true, if is inline
*/
/*
* (non-Javadoc)
*
* @see com.jk.metadata.db.query.QueryComponent#isInline()
*/
@Override
public boolean isInline() {
return true;
}
/**
* Sets the name.
*
* @param name the new name
*/
public void setName(final String name) {
this.name = name;
}
/**
* To query element.
*
* @return the object
*/
/*
* (non-Javadoc)
*
* @see com.jk.metadata.db.query.QueryComponent#toQueryElement()
*/
@Override
public Object toQueryElement() {
return getName();
}
/**
* To string.
*
* @return the string
*/
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return toQueryElement().toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy