org.jboss.shrinkwrap.descriptor.api.orm20.NamedQuery Maven / Gradle / Ivy
package org.jboss.shrinkwrap.descriptor.api.orm20;
import java.util.ArrayList;
import java.util.List;
import org.jboss.shrinkwrap.descriptor.api.Child;
import org.jboss.shrinkwrap.descriptor.api.orm20.LockModeType;
import org.jboss.shrinkwrap.descriptor.api.orm20.QueryHint;
import org.jboss.shrinkwrap.descriptor.api.orm.*;
import org.jboss.shrinkwrap.descriptor.api.orm.OrmNamedQueryCommType;
import org.jboss.shrinkwrap.descriptor.api.orm20.QueryHint;/**
* This interface defines the contract for the named-query
xsd type
* @author Ralf Battenfeld
* @author Andrew Lee Rubinger
* @author George Gastaldi
*/
public interface NamedQuery extends Child,
OrmNamedQueryCommType,
QueryHint>> {
// --------------------------------------------------------------------------------------------------------||
// ClassName: NamedQuery ElementName: xsd:string ElementType : description
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the description
element
* @param description the value for the element description
* @return the current instance of NamedQuery
*/
public NamedQuery description(String description);
/**
* Returns the description
element
* @return the node defined for the element description
*/
public String getDescription();
/**
* Removes the description
element
* @return the current instance of NamedQuery
*/
public NamedQuery removeDescription();
// --------------------------------------------------------------------------------------------------------||
// ClassName: NamedQuery ElementName: xsd:string ElementType : query
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the query
element
* @param query the value for the element query
* @return the current instance of NamedQuery
*/
public NamedQuery query(String query);
/**
* Returns the query
element
* @return the node defined for the element query
*/
public String getQuery();
/**
* Removes the query
element
* @return the current instance of NamedQuery
*/
public NamedQuery removeQuery();
// --------------------------------------------------------------------------------------------------------||
// ClassName: NamedQuery ElementName: orm:lock-mode-type ElementType : lock-mode
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: true isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the lock-mode
element
* @param lockMode the value for the element lock-mode
* @return the current instance of NamedQuery
*/
public NamedQuery lockMode(LockModeType lockMode);
/**
* Sets the lock-mode
element
* @param lockMode the value for the element lock-mode
* @return the current instance of NamedQuery
*/
public NamedQuery lockMode(String lockMode);
/**
* Returns the lock-mode
element
* @return the value found for the element lock-mode
*/
public LockModeType getLockMode();
/**
* Returns the lock-mode
element
* @return the value found for the element lock-mode
*/
public String getLockModeAsString();
/**
* Removes the lock-mode
attribute
* @return the current instance of NamedQuery
*/
public NamedQuery removeLockMode();
// --------------------------------------------------------------------------------------------------------||
// ClassName: NamedQuery ElementName: orm:query-hint ElementType : hint
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new hint
element will be created and returned.
* Otherwise, the first existing hint
element will be returned.
* @return the instance defined for the element hint
*/
public QueryHint> getOrCreateHint();
/**
* Creates a new hint
element
* @return the new created instance of QueryHint>
*/
public QueryHint> createHint();
/**
* Returns all hint
elements
* @return list of hint
*/
public List>> getAllHint();
/**
* Removes all hint
elements
* @return the current instance of QueryHint>
*/
public NamedQuery removeAllHint();
// --------------------------------------------------------------------------------------------------------||
// ClassName: NamedQuery ElementName: xsd:string ElementType : name
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the name
attribute
* @param name the value for the attribute name
* @return the current instance of NamedQuery
*/
public NamedQuery name(String name);
/**
* Returns the name
attribute
* @return the value defined for the attribute name
*/
public String getName();
/**
* Removes the name
attribute
* @return the current instance of NamedQuery
*/
public NamedQuery removeName();
}