Class QueryCaster

java.lang.Object
ortus.boxlang.runtime.dynamic.casters.QueryCaster
All Implemented Interfaces:
IBoxCaster

public class QueryCaster extends Object implements IBoxCaster
I handle casting anything to Query
  • Constructor Details

    • QueryCaster

      public QueryCaster()
  • Method Details

    • attempt

      public static CastAttempt<Query> attempt(Object object)
      Tests to see if the value can be cast to a Query. Returns a CastAttempt<T> which will contain the result if casting was was successfull, or can be interogated to proceed otherwise.
      Parameters:
      object - The value to cast to a Query
      Returns:
      The Query value
    • cast

      public static Query cast(Object object)
      Used to cast anything to a Query, throwing exception if we fail
      Parameters:
      object - The value to cast to a Query
      Returns:
      The Query value
    • cast

      public static Query cast(Object object, Boolean fail)
      Used to cast anything to a Query
      Parameters:
      object - The value to cast to a Query
      fail - True to throw exception when failing.
      Returns:
      The Query value