001package io.ebean.typequery; 002 003/** 004 * String property. 005 * 006 * @param <R> the root query bean type 007 */ 008public class PString<R> extends PBaseCompareable<R, String> { 009 010 /** 011 * Construct with a property name and root instance. 012 * 013 * @param name property name 014 * @param root the root query bean instance 015 */ 016 public PString(String name, R root) { 017 super(name, root); 018 } 019 020 /** 021 * Construct with additional path prefix. 022 */ 023 public PString(String name, R root, String prefix) { 024 super(name, root, prefix); 025 } 026 027 /** 028 * Case insensitive is equal to. 029 * 030 * @param value the equal to bind value 031 * @return the root query bean instance 032 */ 033 public R ieq(String value) { 034 expr().ieq(_name, value); 035 return _root; 036 } 037 038 /** 039 * Case insensitive is equal to. 040 * 041 * @param value the equal to bind value 042 * @return the root query bean instance 043 */ 044 public R iequalTo(String value) { 045 expr().ieq(_name, value); 046 return _root; 047 } 048 049 /** 050 * Like - include '%' and '_' placeholders as necessary. 051 * 052 * @param value the equal to bind value 053 * @return the root query bean instance 054 */ 055 public R like(String value) { 056 expr().like(_name, value); 057 return _root; 058 } 059 060 /** 061 * Starts with - uses a like with '%' wildcard added to the end. 062 * 063 * @param value the equal to bind value 064 * @return the root query bean instance 065 */ 066 public R startsWith(String value) { 067 expr().startsWith(_name, value); 068 return _root; 069 } 070 071 /** 072 * Ends with - uses a like with '%' wildcard added to the beginning. 073 * 074 * @param value the equal to bind value 075 * @return the root query bean instance 076 */ 077 public R endsWith(String value) { 078 expr().endsWith(_name, value); 079 return _root; 080 } 081 082 /** 083 * Contains - uses a like with '%' wildcard added to the beginning and end. 084 * 085 * @param value the equal to bind value 086 * @return the root query bean instance 087 */ 088 public R contains(String value) { 089 expr().contains(_name, value); 090 return _root; 091 } 092 093 /** 094 * Case insensitive like. 095 * 096 * @param value the equal to bind value 097 * @return the root query bean instance 098 */ 099 public R ilike(String value) { 100 expr().ilike(_name, value); 101 return _root; 102 } 103 104 /** 105 * Case insensitive starts with. 106 * 107 * @param value the equal to bind value 108 * @return the root query bean instance 109 */ 110 public R istartsWith(String value) { 111 expr().istartsWith(_name, value); 112 return _root; 113 } 114 115 /** 116 * Case insensitive ends with. 117 * 118 * @param value the equal to bind value 119 * @return the root query bean instance 120 */ 121 public R iendsWith(String value) { 122 expr().iendsWith(_name, value); 123 return _root; 124 } 125 126 /** 127 * Case insensitive contains. 128 * 129 * @param value the equal to bind value 130 * @return the root query bean instance 131 */ 132 public R icontains(String value) { 133 expr().icontains(_name, value); 134 return _root; 135 } 136 137 /** 138 * Add a full text "Match" expression. 139 * <p> 140 * This means the query will automatically execute against the document store (ElasticSearch). 141 * </p> 142 * 143 * @param value the match expression 144 */ 145 public R match(String value) { 146 expr().match(_name, value); 147 return _root; 148 } 149}