Class NullExpressionFunctions

java.lang.Object
org.seasar.doma.internal.expr.NullExpressionFunctions
All Implemented Interfaces:
ExpressionFunctions

public class NullExpressionFunctions extends Object implements ExpressionFunctions
  • Constructor Details

    • NullExpressionFunctions

      public NullExpressionFunctions()
  • Method Details

    • escape

      public String escape(CharSequence text)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using the default escape character.

      For example, a%b_ is converted to the a a$%b$_.

      Specified by:
      escape in interface ExpressionFunctions
      Parameters:
      text - the target text
      Returns:
      the escaped text
    • escape

      public String escape(CharSequence text, char escapeChar)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using a specified escape character.
      Specified by:
      escape in interface ExpressionFunctions
      Parameters:
      text - the target text
      escapeChar - the escape character
      Returns:
      the escaped text
    • prefix

      public String prefix(CharSequence text)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using the default escape character '$' and generate a text to perform a prefix search for the SQL Like operator.

      For example, a%b_ is converted to the a a$%b$_%.

      Specified by:
      prefix in interface ExpressionFunctions
      Parameters:
      text - the prefix text
      Returns:
      the text for a prefix search
    • prefix

      public String prefix(CharSequence text, char escape)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using a specified escape character and generate a text to perform a prefix search for the SQL LIKE operator.
      Specified by:
      prefix in interface ExpressionFunctions
      Parameters:
      text - the prefixed text
      escape - the escape character
      Returns:
      the text for a prefix search
    • suffix

      public String suffix(CharSequence text)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using the default escape character '$' and generate a text to perform a suffix search for the SQL LIKE operator.

      For example, a%b_ is converted to the a %a$%b$_.

      Specified by:
      suffix in interface ExpressionFunctions
      Parameters:
      text - the suffix text
      Returns:
      the text for a suffix search
    • suffix

      public String suffix(CharSequence text, char escape)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using a specified escape character and generate a text to perform a suffix search for the SQL LIKE operator.
      Specified by:
      suffix in interface ExpressionFunctions
      Parameters:
      text - the suffix text
      escape - the escape character
      Returns:
      the text for a suffix search
    • infix

      public String infix(CharSequence text)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using the default escape character '$' and generate a text to perform a infix search for the SQL LIKE operator.

      For example, a%b_ is converted to the a %a$%b$_%.

      Specified by:
      infix in interface ExpressionFunctions
      Parameters:
      text - the infix text
      Returns:
      the text for a infix search
    • infix

      public String infix(CharSequence text, char escapeChar)
      Description copied from interface: ExpressionFunctions
      Escapes the SQL LIKE wild card characters in a target string by using a specified escape character and generate a text to perform a infix search for the SQL LIKE operator.
      Specified by:
      infix in interface ExpressionFunctions
      Parameters:
      text - the infix text
      escapeChar - the escape character
      Returns:
      the text for a infix search
    • roundDownTimePart

      public Date roundDownTimePart(Date date)
      Description copied from interface: ExpressionFunctions
      Round down a time part of Date.
      Specified by:
      roundDownTimePart in interface ExpressionFunctions
      Parameters:
      date - the target date
      Returns:
      the date whose time part is rounded down
    • roundDownTimePart

      public Date roundDownTimePart(Date date)
      Description copied from interface: ExpressionFunctions
      Round down a time part of Date.
      Specified by:
      roundDownTimePart in interface ExpressionFunctions
      Parameters:
      date - the target date
      Returns:
      the date whose time part is rounded down
    • roundDownTimePart

      public Timestamp roundDownTimePart(Timestamp timestamp)
      Description copied from interface: ExpressionFunctions
      Round down a time part of Timestamp.
      Specified by:
      roundDownTimePart in interface ExpressionFunctions
      Parameters:
      timestamp - the target timestamp
      Returns:
      the timestamp whose time part is rounded down
    • roundDownTimePart

      public LocalDateTime roundDownTimePart(LocalDateTime localDateTime)
      Description copied from interface: ExpressionFunctions
      Round down a time part of LocalDateTime.
      Specified by:
      roundDownTimePart in interface ExpressionFunctions
      Parameters:
      localDateTime - the target localDateTime
      Returns:
      the localDateTime whose time part is rounded down
    • roundUpTimePart

      public Date roundUpTimePart(Date date)
      Description copied from interface: ExpressionFunctions
      Round up a time part of Date.
      Specified by:
      roundUpTimePart in interface ExpressionFunctions
      Parameters:
      date - the target date
      Returns:
      the date whose time part is rounded up
    • roundUpTimePart

      public Date roundUpTimePart(Date date)
      Description copied from interface: ExpressionFunctions
      Round up a time part of Date.
      Specified by:
      roundUpTimePart in interface ExpressionFunctions
      Parameters:
      date - the target date
      Returns:
      the date whose time part is rounded up
    • roundUpTimePart

      public Timestamp roundUpTimePart(Timestamp timestamp)
      Description copied from interface: ExpressionFunctions
      Round up a time part of Timestamp.
      Specified by:
      roundUpTimePart in interface ExpressionFunctions
      Parameters:
      timestamp - the target timestamp
      Returns:
      the timestamp whose time part is rounded up
    • roundUpTimePart

      public LocalDate roundUpTimePart(LocalDate localDate)
      Description copied from interface: ExpressionFunctions
      Return the next day.
      Specified by:
      roundUpTimePart in interface ExpressionFunctions
      Parameters:
      localDate - the target localDate
      Returns:
      the next day
    • roundUpTimePart

      public LocalDateTime roundUpTimePart(LocalDateTime localDateTime)
      Description copied from interface: ExpressionFunctions
      Round up a time part of LocalDateTime.
      Specified by:
      roundUpTimePart in interface ExpressionFunctions
      Parameters:
      localDateTime - the target localDateTime
      Returns:
      the localDateTime whose time part is rounded up
    • isEmpty

      public boolean isEmpty(CharSequence charSequence)
      Description copied from interface: ExpressionFunctions
      Whether a text is empty.
      Specified by:
      isEmpty in interface ExpressionFunctions
      Parameters:
      charSequence - the target text
      Returns:
      true if the text is null or its length is 0, else false
    • isNotEmpty

      public boolean isNotEmpty(CharSequence charSequence)
      Description copied from interface: ExpressionFunctions
      Whether a text is not empty.
      Specified by:
      isNotEmpty in interface ExpressionFunctions
      Parameters:
      charSequence - the target text
      Returns:
      false if the text is null or its length is 0, else true
    • isBlank

      public boolean isBlank(CharSequence charSequence)
      Description copied from interface: ExpressionFunctions
      Whether a text is blank.
      Specified by:
      isBlank in interface ExpressionFunctions
      Parameters:
      charSequence - the target text
      Returns:
      true if the text is null, its length is 0 or the text contains only blank characters, else false.
    • isNotBlank

      public boolean isNotBlank(CharSequence charSequence)
      Description copied from interface: ExpressionFunctions
      Whether a text is not blank.
      Specified by:
      isNotBlank in interface ExpressionFunctions
      Parameters:
      charSequence - the target text
      Returns:
      false if the text is null, its length is 0 or the text contains only blank characters, else true.