Class Query

All Implemented Interfaces:
DeleteMarkerable, LocalizableOM, Orderable<Query>, Serializable, Comparable<Query>, ColumnAccessByName, ObjectModel, Persistent

public class Query extends BaseQuery implements Orderable<Query>, LocalizableOM, DeleteMarkerable
Artifactizable(Query) The skeleton for this class was autogenerated by Torque This class manages the Query table. TODO : Personal 은 Artifactizable 을 만들지 않는다. Scope 에 따라 Artifactizable Process 를 진행한다.
Version:
$Id: Query.java,v 1.193 2008/12/25 04:03:45 youngho Exp $
Author:
Youngho Cho
  • Field Details

    • OPTION_NAME_PATTERN

      protected static final Pattern OPTION_NAME_PATTERN
      Query 가 하나의 AttributeOption 에 대응되고 있을때 Query 의 이름 패턴
    • DEFAULT_NUMBER

      public static final int DEFAULT_NUMBER
      the default number which show in a single page TODO : use configure
      See Also:
  • Constructor Details

    • Query

      public Query()
      새로운 Query 인스턴스를 생성한다.
  • Method Details

    • save

      public void save() throws Exception
      Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseQuery
      Throws:
      Exception - 저장 중 오류가 발생한 경우
    • save

      public void save(Connection dbCon) throws Exception
      저장 후 변경된 경우 text index 를 갱신한다. (SearchFactory.index(Object))
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseQuery
      Parameters:
      dbCon - connection
      Throws:
      Exception - 저장 중 오류가 발생한 경우
    • getLocalized

      public Localized[] getLocalized(Locale locale) throws TorqueException
      Description copied from interface: LocalizableOM
      locale 에 해당하는 localized 정보를 구한다.
      Specified by:
      getLocalized in interface LocalizableOM
      Parameters:
      locale -
      Returns:
      localized
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getEasyDeskUserImpl

      public EasyDeskUserImpl getEasyDeskUserImpl() throws TorqueException
      Get the value of workingUser. query 의 owner 와 query 를 실행할 때 실행자가 다르다. database 의 workingUser 는 query 의 Owner 이고 , object 의 workingUser 는 query 실행자이다.
      Overrides:
      getEasyDeskUserImpl in class BaseQuery
      Returns:
      value of workingUser.
      Throws:
      TorqueException - when reading from the database fails.
    • setEasyDeskUserImpl

      public void setEasyDeskUserImpl(EasyDeskUserImpl v)
      Set the value of workingUser.
      Overrides:
      setEasyDeskUserImpl in class BaseQuery
      Parameters:
      v - Value to assign to workingUser.
    • delete

      public boolean delete(boolean overrideLock) throws Exception
      Checks if user has permission to delete query. Only the creating user can delete a personal query. Only project owner or admin can delete a project-wide query.
      Specified by:
      delete in interface DeleteMarkerable
      Parameters:
      overrideLock - lock 이 걸려 있어도 삭제할지 여부
      Returns:
      true success false not success
      Throws:
      Exception - 삭제 중 오류가 발생한 경우
    • isOwner

      public boolean isOwner(EasyDeskUser user)
      DOCUMENT ME!
      Parameters:
      user - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getQueryString

      public static String getQueryString(org.apache.fulcrum.parser.ValueParser parser, EasyDeskUser user)
      ParameterParser 에서 Query 의 Value 값인 queryString 을 만든다.
      Parameters:
      parser -
      user -
      Returns:
      The search string used to perform the query. (Does not refer to the CGI context of the term "query string".)
    • getQueryString

      public static String getQueryString(org.apache.fulcrum.parser.ValueParser parser, EasyDeskUser user, boolean edit)
      ParameterParser 에서 Query 의 Value 값인 queryString 을 만든다.
      Parameters:
      parser -
      user -
      edit -
      Returns:
      The search string used to perform the query. (Does not refer to the CGI context of the term "query string".)
    • getQueryKeyWords

      public static String[] getQueryKeyWords(String queryWords) throws Exception
      queryWords 에서 keyWord 들을 추출한다.
      Parameters:
      queryWords -
      Returns:
      keyword string array
      Throws:
      Exception
    • getTextQuery

      public static Query[] getTextQuery(Module module, String queryWords) throws Exception
      Deprecated.
      please use getTextQuery(Module module, String[] words) instead
      KeyWord Query Copy 를 만든다.
      Parameters:
      module -
      queryWords -
      Returns:
      query array which is corresponde with each words
      Throws:
      Exception
    • getTextQuery

      public static Query[] getTextQuery(Module module, String[] words) throws Exception
      TextScope KeyWord Query Copy 를 만든다.
      Parameters:
      module -
      words - key word array
      Returns:
      query array which is corresponde with each words
      Throws:
      Exception
    • getQueryString

      public String getQueryString() throws Exception
      Returns:
      설정된 QueryString 을 구한다.
      Throws:
      Exception
    • getQueryString

      public String getQueryString(boolean editmode) throws Exception
      Deprecated.
      please use getQueryString(parser, mode); instead
      Parameters:
      editmode -
      Returns:
      설정된 QueryString 을 구한다.
      Throws:
      Exception
    • getQueryString

      public String getQueryString(org.apache.fulcrum.parser.ValueParser parser, boolean editmode) throws Exception
      Parameters:
      parser -
      editmode -
      Returns:
      설정된 QueryString 을 구한다.
      Throws:
      Exception
    • setValueParser

      public void setValueParser(org.apache.fulcrum.parser.ValueParser parser) throws Exception
      QueryValue List 를 설정한다. 필요하면 database 에 저장한다.
      Parameters:
      parser -
      Throws:
      Exception
    • setValueParser

      public void setValueParser(org.apache.fulcrum.parser.ValueParser parser, boolean byPropagate) throws Exception
      QueryValue List 를 설정한다. 필요하면 database 에 저장한다.
      Parameters:
      parser - : parser 에 있는 값은 모든 검색 조건을 가지고 있는 QueryValue 전체의 값이어야 한다.
      byPropagate - 전파 mode 인지
      Throws:
      Exception
    • mixinValue

      public org.apache.fulcrum.parser.ValueParser mixinValue(org.apache.fulcrum.parser.ValueParser parser) throws Exception
      { name, value } 를 mixin 시킨다.
      Parameters:
      parser -
      Returns:
      mixined parser
      Throws:
      Exception
    • addValueParser

      public org.apache.fulcrum.parser.ValueParser addValueParser(org.apache.fulcrum.parser.ValueParser parser) throws Exception
      기존의 Query Value 에 새로운 것을 add 한다. database 에 저장을 하지 않는다.
      Parameters:
      parser -
      Returns:
      add query value parser
      Throws:
      Exception
    • addValueParser

      public org.apache.fulcrum.parser.ValueParser addValueParser(org.apache.fulcrum.parser.ValueParser parser, boolean editmode) throws Exception
      기존의 Query Value 에 새로운 것을 add 한다. database 에 저장을 하지 않는다.
      Parameters:
      parser -
      editmode -
      Returns:
      add query value parser
      Throws:
      Exception
    • getValueParser

      public org.apache.fulcrum.parser.ValueParser getValueParser() throws Exception
      Returns:
      ValueParser of queryValues
      Throws:
      Exception
    • getValueParser

      public org.apache.fulcrum.parser.ValueParser getValueParser(boolean editmode) throws Exception
      Deprecated.
      please use getValueParser(parser, mode); instead
      editmode 는 personalScope 의 처리를 위하여 존재한다. ( 사용자 속성의 처리시에도 필요할 수 있다. )
      Parameters:
      editmode -
      Returns:
      ValueParser of queryValues
      Throws:
      Exception
    • getValueParser

      public org.apache.fulcrum.parser.ValueParser getValueParser(org.apache.fulcrum.parser.ValueParser parser) throws Exception
      Parameters:
      parser - vanila parser
      Returns:
      ValueParser of queryValues
      Throws:
      Exception
    • getValueParser

      public org.apache.fulcrum.parser.ValueParser getValueParser(org.apache.fulcrum.parser.ValueParser parser, boolean editmode) throws Exception
      editmode 는 personalScope 의 처리를 위하여 존재한다. ( 사용자 속성의 처리시에도 필요할 수 있다. )
      Parameters:
      editmode -
      Returns:
      ValueParser of queryValues
      Throws:
      Exception
    • getQueryValueIds

      protected List<ObjectKey<?>> getQueryValueIds() throws TorqueException
      Throws:
      TorqueException