.. java:import:: java.nio.file Path .. java:import:: java.nio.file Paths .. java:import:: java.sql CallableStatement .. java:import:: java.sql SQLException .. java:import:: java.util.regex Matcher .. java:import:: java.util.regex Pattern .. java:import:: org.caosdb.server.query Query.QueryException .. java:import:: org.jdom2 Element StoredAt ======== .. java:package:: org.caosdb.server.query :noindex: .. java:type:: public class StoredAt implements EntityFilterInterface Fields ------ PATTERN ^^^^^^^ .. java:field:: public static final java.util.regex.Pattern PATTERN :outertype: StoredAt likeLocation ^^^^^^^^^^^^ .. java:field:: final String likeLocation :outertype: StoredAt location ^^^^^^^^ .. java:field:: String location :outertype: StoredAt pattern_matching ^^^^^^^^^^^^^^^^ .. java:field:: boolean pattern_matching :outertype: StoredAt Constructors ------------ StoredAt ^^^^^^^^ .. java:constructor:: public StoredAt(String loc) :outertype: StoredAt Methods ------- apply ^^^^^ .. java:method:: @Override public void apply(QueryInterface query) throws QueryException :outertype: StoredAt convertLikeLocation ^^^^^^^^^^^^^^^^^^^ .. java:method:: static String convertLikeLocation(String location) :outertype: StoredAt Does some special character escaping for LIKE query. The following rules should take place in the future (for now, only a subset is implemented correctly): .. * \* -> * (No special meaning in SQL, even numbers of \ are ignored.) * * -> %% (Wildcard, to be converted to a more complicated regex without / later. Exception: at the beginning of a search expression, convert to %.) * ** -> % (Wildcard, also ***, ****, ... -> %) * _ -> \_ (Prevent special meaning in SQL) * % -> \% (Prevent special meaning in SQL) * Heading `/` is removed :param String: location The String to be converted. :return: The converted String. getCacheKey ^^^^^^^^^^^ .. java:method:: @Override public String getCacheKey() :outertype: StoredAt requiresPatternMatching ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: static boolean requiresPatternMatching(String location) :outertype: StoredAt Tests if the location String is intended for pattern matching. :param String: location The String to be converted. :return: True if the location requires pattern matching for a LIKE query, false otherwise. toElement ^^^^^^^^^ .. java:method:: @Override public Element toElement() :outertype: StoredAt toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: StoredAt For testing purposes, create a string representing the corresponding query. :return: The String "SAT()", where "" is the query string.