id
stringlengths
7
14
text
stringlengths
1
106k
1711467_5
@Override public void initialize(Map<String, Object> puProperties) { this.externalProperties = puProperties; this.propertyReader = new ESClientPropertyReader(externalProperties, kunderaMetadata.getApplicationMetadata() .getPersistenceUnitMetadata(getPersistenceUnit())); propertyReader.read(getPe...
1711467_6
public static String toString(Collection<?> input, Class<?> genericClass, String mediaType) { if (MediaType.APPLICATION_XML.equals(mediaType)) { StringBuilder sb = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>") .append("<").append(genericClass.getSimpl...
1711467_7
public static Collection toCollection(String input, Class<?> collectionClass, Class<?> genericClass, String mediaType) { try { if (MediaType.APPLICATION_XML.equals(mediaType)) { Collection c = (Collection) collectionClass.newInstance(); if (input.startsWith("<?xml...
1711467_8
public static String toString(Collection<?> input, Class<?> genericClass, String mediaType) { if (MediaType.APPLICATION_XML.equals(mediaType)) { StringBuilder sb = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>") .append("<").append(genericClass.getSimpl...
1711467_9
public static boolean isValidQuery(String queryString, String httpMethod) { if (queryString == null || httpMethod == null) { return false; } queryString = queryString.trim(); if (queryString.length() < 6) return false; String firstKeyword = queryString.substring(0, 6); String all...
1720284_0
@Override public void run() { try { String userId = env.getEnv().get(Environment.ENV_USER); this.committer = userService.find(userId); if (readStdin) { String line = null; while((line = stdin.readLine()) != null) { if ("--".equals(line)) { break; } handle(line); } } else { handle(t...
1720284_1
@Override public Iterable<CommandProvider<?>> get() { Collection<CommandProvider<?>> commands = new ArrayList<CommandProvider<?>>(); bind(commands, ReceivePackCommandProvider.class); bind(commands, GetStatusCommandProvider.class); bind(commands, MonitorCommandProvider.class); bind(commands, SendBuildCommandProvide...
1720284_2
@Override public CatBuildCommand command(String command) throws Exception { // magrit cat-build SHA1 Scanner s = new Scanner(command); s.useDelimiter("\\s{1,}"); check(s.next(), "magrit"); check(s.next(), "cat-build"); check(command, s.hasNext()); this.repository = createRepository(s.next()); check(command, s.h...
1720284_3
@Override public void run() { PrintStream pOut =null; try { BuildResult last = dao.getLast(repository, sha1); pOut = new PrintStream(out); if (last != null) { out.write(last.getLog()); } else { pOut.println("No log found for this commit."); } out.flush(); callback.onExit(0); } catch (Throwable e)...
1720284_4
@Override public void setInputStream(InputStream in) { if (logStreams && !(in instanceof LoggerInputStream)) { this.in = new LoggerInputStream(in); } else { this.in = in; } }
1720284_5
@Override public void setOutputStream(OutputStream out) { if (logStreams && !(out instanceof LoggerOutputStream)) { this.out = new LoggerOutputStream(out); } else { this.out = out; } }
1720284_6
@Override public void setErrorStream(OutputStream err) { if (logStreams && !(err instanceof LoggerOutputStream)) { this.err = new LoggerOutputStream(err); } else { this.err = err; } }
1720284_7
protected void checkSha1(String sha1) { if (!gitUtils.isSha1(sha1)) { throw new IllegalArgumentException(String.format("%s isn't a valid 40 bytes SHA1", sha1)); } }
1720284_8
protected void checkSha1(String sha1) { if (!gitUtils.isSha1(sha1)) { throw new IllegalArgumentException(String.format("%s isn't a valid 40 bytes SHA1", sha1)); } }
1720284_9
protected Repository createRepository(String repoPath) throws IOException { return gitUtils.createRepository( new File( ctx.configuration().getRepositoriesHomeDir(), repoPath ) ); }
1724015_0
public Object execute(final File script) throws Exception { final GroovyShell shell = new GroovyShell(binding()); final Object result = shell.evaluate(script); return result; }
1724015_1
public Object execute(final File script) throws Exception { final GroovyShell shell = new GroovyShell(binding()); final Object result = shell.evaluate(script); return result; }
1724015_2
static String mvnToAether(String name) { Matcher m = mvnPattern.matcher(name); if (!m.matches()) { return name; } StringBuilder b = new StringBuilder(); b.append(m.group(1)).append(":");//groupId b.append(m.group(2)).append(":");//artifactId String extension = m.group(5); String ...
1724015_3
static String aetherToMvn(String name) { Matcher m = aetherPattern.matcher(name); if (!m.matches()) { return name; } StringBuilder b = new StringBuilder("mvn:"); b.append(m.group(1)).append("/");//groupId b.append(m.group(2)).append("/");//artifactId b.append(m.group(7));//version ...
1724015_4
static String pathFromMaven(String name) { if (name.indexOf(':') == -1) { return name; } name = mvnToAether(name); return pathFromAether(name); }
1724015_5
static String pathFromAether(String name) { DefaultArtifact artifact = new DefaultArtifact(name); Artifact mavenArtifact = RepositoryUtils.toArtifact(artifact); return layout.pathOf(mavenArtifact); }
1724015_6
static String artifactToMvn(Artifact artifact) { return artifactToMvn(RepositoryUtils.toArtifact(artifact)); }
1742658_0
void visitItem(final String name, FormItemVisitor visitor) { String namePrefix = name + "_"; for(Map<String, FormItem> groupItems : formItems.values()) { for(String key : groupItems.keySet()) { if(key.equals(name) || key.startsWith(namePrefix)) { visit...
1742658_1
public ListBoxItem(String name, String title) { super(name, title); listBox = new ListBox(); listBox.setName(name); listBox.setTitle(title); listBox.setVisibleItemCount(1); listBox.setTabIndex(0); valueChangeHandler = new ChangeHandler() { @Override public void onChange(Chang...
1742658_2
public void setChoices(Collection<String> choices, String defaultChoice) { Set<String> sortedChoices = new TreeSet<String>(choices); int i = 0; int idx = -1; listBox.clear(); for (String c : sortedChoices) { listBox.addItem(c); if (c.equals(defaultChoice)) idx = i; ...
1742658_3
public TextAreaItem(String name, String title) { super(name, title); setup(); }
1742658_4
@Override public void resetMetaData() { super.resetMetaData(); textArea.setValue(null); }
1742658_5
@Override public boolean validate(String value) { return !(isRequired() && value.trim().equals("")); }
1742658_6
@Override public boolean validate(String value) { return !(isRequired() && value.trim().equals("")); }
1742658_7
@Override public boolean validate(T value) { if (valueClass.equals(Long.class)) // Currently supported values are always >= 0. A -1 return value signals incorrect input. return (Long) value != -1l; if (valueClass.equals(Integer.class)) // Currently supported values are always >= 0. A -1 ...
1742658_8
@Override public Widget render(RenderMetaData metaData, String groupName, Map<String, FormItem> groupItems) { SafeHtmlBuilder builder = new SafeHtmlBuilder(); builder.appendHtmlConstant(tablePrefix); // build html structure ArrayList<String> itemKeys = new ArrayList<String>(groupItems.keySet()); Arr...
1743159_0
public static ServiceObject build(JSONObject jobj) throws JSONException{ ServiceObject s = new ServiceObject(jobj.toString()); return s; }
1743159_1
@Override public void deleteByEndpointID(String endpointID) throws MultipleResourceException, NonExistingResourceException, PersistentStoreFailureException { database.requestStart(); database.requestEnsureConnection(); BasicDBObject query = new BasicDBObject(); query.put(ServiceBasicAttributeNames.SERVICE_ENDPO...
1743159_2
@Override public void insert(ServiceObject item) throws ExistingResourceException, PersistentStoreFailureException { try { if (logger.isDebugEnabled()) { logger.debug("inserting: " + item.toDBObject()); } database.requestStart(); database.requestEnsureConnection(); DBObject db = item.toDBObject(); // ...
1743159_3
public Response registerService(JSONObject serviceInfo) throws WebApplicationException, JSONException { Integer length = serviceInfo.length(); if (length <= 0 || length > 100) { throw new WebApplicationException(Status.FORBIDDEN); } try { Client c = (Client) req.getAttribute("client"); if (!EMIRServer.getSe...
1743159_4
@POST @Produces({MediaType.APPLICATION_JSON}) @Consumes(MediaType.APPLICATION_JSON) public Response richQueryForJSON(JSONObject queryDocument, @Context UriInfo ui) throws WebApplicationException, JSONException { MultivaluedMap<String, String> queryParams = ui.getQueryParameters(); Set<String> s = queryParams.keySet...
1743159_5
@POST @Produces(MediaType.APPLICATION_XML) @Consumes(MediaType.APPLICATION_JSON) public Response richQueryForXML(JSONObject queryDocument, @Context UriInfo ui) throws WebApplicationException { MultivaluedMap<String, String> queryParams = ui.getQueryParameters(); Set<String> s = queryParams.keySet(); Map<String, Ob...
1743159_6
public ChildrenManager() { childServices = new HashMap<String, Date>(); }
1743159_7
public synchronized List<String> getChildDSRs() { List<String> result = new ArrayList<String>(); Date currentTime = new Date(); Set<String> s=childServices.keySet(); Iterator<String> it=s.iterator(); while(it.hasNext()) { String key=it.next(); Date value=childServices.get(key); i...
1743159_8
public synchronized boolean addChildDSR(String identifier) throws EmptyIdentifierFailureException, NullPointerFailureException { if (identifier == null) throw new NullPointerFailureException(); if (identifier.isEmpty()) throw new EmptyIdentifierFailureException(); boolean retval = false; if (childServices.con...
1743159_9
public InfrastructureManager() { parentsRoute = new ArrayList<String>(); try { Class.forName("org.h2.Driver"); } catch (ClassNotFoundException e) { Log.logException("", e); } try { String h2db = EMIRServer.getServerProperties().getValue( ServerProperties.PROP_H2_DBFILE_PATH); if (h2db == null || h2db.i...
1743723_0
@SafeVarargs @SuppressWarnings("unchecked") public final static <T> T[] copyArrayExcept(T[] array, T... except) { final List<T> values = CollectionFactory.newList(); for (final T item : array) { if (Arrays.binarySearch(except, item, new Comparator<T>() { @Override public int compare(Object o1, Object o2) { ...
1743723_1
@Override public synchronized List<ScriptContext> load(File scriptDescriptor) throws Exception { Preconditions.checkNotNull(scriptDescriptor, "scriptDescriptor"); final JAXBContext c = JAXBContext.newInstance(ScriptInfo.class, ScriptList.class); final Unmarshaller u = c.createUnmarshaller(); final ScriptList l...
1743723_2
@Override public synchronized List<ScriptContext> load(File scriptDescriptor) throws Exception { Preconditions.checkNotNull(scriptDescriptor, "scriptDescriptor"); final JAXBContext c = JAXBContext.newInstance(ScriptInfo.class, ScriptList.class); final Unmarshaller u = c.createUnmarshaller(); final ScriptList l...
1757703_0
public static PrestoContextField getContextField(Presto session, String path) { PrestoDataProvider dataProvider = session.getDataProvider(); PrestoSchemaProvider schemaProvider = session.getSchemaProvider(); String[] traverse = path.split(FIELD_PATH_SEPARATOR_REGEX); if (traverse.length % 3 != 0) { ...
1757703_1
public static PrestoContext getTopicByPath(Presto session, String path, String topicId, String viewId) { if (path == null || path.equals("_")) { return PrestoContext.create(session.getResolver(), PathParser.deskull(topicId), viewId); } PrestoContextField contextField = getContextField(session, path)...
1757703_2
public static PrestoContext getTopicByPath(Presto session, String path, String topicId, String viewId) { if (path == null || path.equals("_")) { return PrestoContext.create(session.getResolver(), PathParser.deskull(topicId), viewId); } PrestoContextField contextField = getContextField(session, path)...
1757703_3
public static PrestoContext getTopicByPath(Presto session, String path, String topicId, String viewId) { if (path == null || path.equals("_")) { return PrestoContext.create(session.getResolver(), PathParser.deskull(topicId), viewId); } PrestoContextField contextField = getContextField(session, path)...
1757703_4
public static PrestoContext getTopicByPath(Presto session, String path, String topicId, String viewId) { if (path == null || path.equals("_")) { return PrestoContext.create(session.getResolver(), PathParser.deskull(topicId), viewId); } PrestoContextField contextField = getContextField(session, path)...
1757703_5
public static PrestoContext getTopicByPath(Presto session, String path, String topicId, String viewId) { if (path == null || path.equals("_")) { return PrestoContext.create(session.getResolver(), PathParser.deskull(topicId), viewId); } PrestoContextField contextField = getContextField(session, path)...
1757703_6
public static String getInlineTopicPath(PrestoContext context, PrestoField field) { if (context == null) { return "_"; } String topicId = context.getTopicId(); String viewId = context.getView().getId(); String fieldId = field.getId(); String localPath = PathParser.skull(topicId) + PathPa...
1757703_7
public static <T> List<T> moveValuesToIndex(List<? extends T> values, List<? extends T> moveValues, int index, boolean allowAdd) { int size = values.size(); if (index > size) { throw new ArrayIndexOutOfBoundsException("Index: " + index + ", Size: " + values.size()); } List<T> result = new ArrayL...
1757703_8
public static <T> List<T> moveValuesToIndex(List<? extends T> values, List<? extends T> moveValues, int index, boolean allowAdd) { int size = values.size(); if (index > size) { throw new ArrayIndexOutOfBoundsException("Index: " + index + ", Size: " + values.size()); } List<T> result = new ArrayL...
1757703_9
public static <T> List<T> moveValuesToIndex(List<? extends T> values, List<? extends T> moveValues, int index, boolean allowAdd) { int size = values.size(); if (index > size) { throw new ArrayIndexOutOfBoundsException("Index: " + index + ", Size: " + values.size()); } List<T> result = new ArrayL...
1767164_0
@ExceptionHandler(value={ ObjectNotFoundException.class, EntityNotFoundException.class, EntityExistsException.class, DataIntegrityViolationException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(...
1767164_1
@ExceptionHandler(value={ ObjectNotFoundException.class, EntityNotFoundException.class, EntityExistsException.class, DataIntegrityViolationException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(...
1767164_2
@ExceptionHandler(value={ ObjectNotFoundException.class, EntityNotFoundException.class, EntityExistsException.class, DataIntegrityViolationException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(...
1767164_3
@ExceptionHandler(value={ ObjectNotFoundException.class, EntityNotFoundException.class, EntityExistsException.class, DataIntegrityViolationException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(...
1767164_4
@ExceptionHandler(value={ ObjectNotFoundException.class, EntityNotFoundException.class, EntityExistsException.class, DataIntegrityViolationException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(...
1767164_5
public static Class<?> getGenericType(Class<?> clazz) { return getGenericType(clazz, 0); }
1767164_6
public static Class<?> getGenericTypeFromBean(Object object) { Class<?> clazz = object.getClass(); if (AopUtils.isAopProxy(object)) { clazz = AopUtils.getTargetClass(object); } return getGenericType(clazz); }
1767164_7
@ExceptionHandler(value={ IllegalArgumentException.class, ValidationException.class, NotFoundException.class, NotImplementedException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(); HttpStat...
1767164_8
@ExceptionHandler(value={ IllegalArgumentException.class, ValidationException.class, NotFoundException.class, NotImplementedException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(); HttpStat...
1767164_9
@ExceptionHandler(value={ IllegalArgumentException.class, ValidationException.class, NotFoundException.class, NotImplementedException.class }) public ResponseEntity<Object> handleCustomException(Exception ex, WebRequest request) { HttpHeaders headers = new HttpHeaders(); HttpStat...
1767458_0
public UserProfile fetchUserProfile(TripIt tripit) { TripItProfile profile = tripit.getUserProfile(); return new UserProfileBuilder().setName(profile.getPublicDisplayName()).setEmail(profile.getEmailAddress()).setUsername(profile.getScreenName()).build(); }
1767458_1
public UserProfile fetchUserProfile(TripIt tripit) { TripItProfile profile = tripit.getUserProfile(); return new UserProfileBuilder().setName(profile.getPublicDisplayName()).setEmail(profile.getEmailAddress()).setUsername(profile.getScreenName()).build(); }
1767458_2
public UserProfile fetchUserProfile(TripIt tripit) { TripItProfile profile = tripit.getUserProfile(); return new UserProfileBuilder().setName(profile.getPublicDisplayName()).setEmail(profile.getEmailAddress()).setUsername(profile.getScreenName()).build(); }
1767458_3
public UserProfile fetchUserProfile(TripIt tripit) { TripItProfile profile = tripit.getUserProfile(); return new UserProfileBuilder().setName(profile.getPublicDisplayName()).setEmail(profile.getEmailAddress()).setUsername(profile.getScreenName()).build(); }
1767458_4
public String getProfileId() { return getUserProfile().getId(); }
1767458_5
public String getProfileUrl() { return getUserProfile().getProfileUrl(); }
1767458_6
public List<Trip> getUpcomingTrips() { return getRestTemplate().getForObject("https://api.tripit.com/v1/list/trip/traveler/true/past/false?format=json", TripList.class).getList(); }
1767458_7
public List<Trip> getUpcomingTrips() { return getRestTemplate().getForObject("https://api.tripit.com/v1/list/trip/traveler/true/past/false?format=json", TripList.class).getList(); }
1767458_8
public List<Trip> getUpcomingTrips() { return getRestTemplate().getForObject("https://api.tripit.com/v1/list/trip/traveler/true/past/false?format=json", TripList.class).getList(); }
1767567_0
public static Object findFactory(String factoryId, String defaultImpl) throws PreProcessFailedException { CodeGenClassLoader classLoader = null; try { ClassLoader parent = Thread.currentThread().getContextClassLoader().getParent(); if(parent instanceof CodeGenClassLoader) { classLoader = (CodeGenCl...
1767567_1
public static boolean isCollectionType(Class<?> typeClazz) { if (typeClazz == null || typeClazz.isPrimitive()) { return false; } boolean isCollectionType = false; for (Class<?> collectionClazz : s_collectionTypes) { if (collectionClazz.isAssignableFrom(typeClazz)) { isCollectionType = true; break; ...
1767567_2
public static boolean isCollectionType(Class<?> typeClazz) { if (typeClazz == null || typeClazz.isPrimitive()) { return false; } boolean isCollectionType = false; for (Class<?> collectionClazz : s_collectionTypes) { if (collectionClazz.isAssignableFrom(typeClazz)) { isCollectionType = true; break; ...
1767567_3
public static boolean isCollectionType(Class<?> typeClazz) { if (typeClazz == null || typeClazz.isPrimitive()) { return false; } boolean isCollectionType = false; for (Class<?> collectionClazz : s_collectionTypes) { if (collectionClazz.isAssignableFrom(typeClazz)) { isCollectionType = true; break; ...
1767567_4
public static boolean isCollectionType(Class<?> typeClazz) { if (typeClazz == null || typeClazz.isPrimitive()) { return false; } boolean isCollectionType = false; for (Class<?> collectionClazz : s_collectionTypes) { if (collectionClazz.isAssignableFrom(typeClazz)) { isCollectionType = true; break; ...
1767567_5
public static boolean isCollectionType(Class<?> typeClazz) { if (typeClazz == null || typeClazz.isPrimitive()) { return false; } boolean isCollectionType = false; for (Class<?> collectionClazz : s_collectionTypes) { if (collectionClazz.isAssignableFrom(typeClazz)) { isCollectionType = true; break; ...
1767567_6
public static boolean hasCollectionType(Class<?>[] types) { if (types == null || types.length == 0) { return false; } boolean hasCollectionType = false; for (Class<?> typeClazz : types) { if (isCollectionType(typeClazz)) { hasCollectionType = true; break; } } return hasCollectionType; }
1767567_7
public static boolean hasCollectionType(Class<?>[] types) { if (types == null || types.length == 0) { return false; } boolean hasCollectionType = false; for (Class<?> typeClazz : types) { if (isCollectionType(typeClazz)) { hasCollectionType = true; break; } } return hasCollectionType; }
1767567_8
public static boolean hasCollectionType(Class<?>[] types) { if (types == null || types.length == 0) { return false; } boolean hasCollectionType = false; for (Class<?> typeClazz : types) { if (isCollectionType(typeClazz)) { hasCollectionType = true; break; } } return hasCollectionType; }
1767567_9
public static boolean hasAttachmentTypeRef(Class<?> type, Set<String> typeNameSet) { // If Type is already processed or being processed // then don't process it again, which might cause // infinite loop // ex: A class referring itself (Linked list node class) if (type == null || typeNameSet.contains(type.getNam...
1768217_0
public UserProfile fetchUserProfile(Twitter twitter) { TwitterProfile profile = twitter.userOperations().getUserProfile(); return new UserProfileBuilder().setName(profile.getName()).setUsername(profile.getScreenName()).build(); }
1768217_1
public UserProfile fetchUserProfile(Twitter twitter) { TwitterProfile profile = twitter.userOperations().getUserProfile(); return new UserProfileBuilder().setName(profile.getName()).setUsername(profile.getScreenName()).build(); }
1768217_2
public UserProfile fetchUserProfile(Twitter twitter) { TwitterProfile profile = twitter.userOperations().getUserProfile(); return new UserProfileBuilder().setName(profile.getName()).setUsername(profile.getScreenName()).build(); }
1768217_3
public UserProfile fetchUserProfile(Twitter twitter) { TwitterProfile profile = twitter.userOperations().getUserProfile(); return new UserProfileBuilder().setName(profile.getName()).setUsername(profile.getScreenName()).build(); }
1768217_4
public UserProfile fetchUserProfile(Twitter twitter) { TwitterProfile profile = twitter.userOperations().getUserProfile(); return new UserProfileBuilder().setName(profile.getName()).setUsername(profile.getScreenName()).build(); }
1768217_5
public SearchResults search(String query) { return this.search(new SearchParameters(query)); }
1768217_6
public SearchResults search(String query) { return this.search(new SearchParameters(query)); }
1768217_7
public SearchResults search(String query) { return this.search(new SearchParameters(query)); }
1768217_8
public SearchResults search(String query) { return this.search(new SearchParameters(query)); }
1768217_9
public SearchResults search(String query) { return this.search(new SearchParameters(query)); }
1768307_0
static Map<String, List<Integer>> updateParameterNamesToIndexes(Map<String, List<Integer>> parametersNameToIndex, List<ArrayParameter> arrayParametersSortedAsc) { for(Map.Entry<String, List<Integer>> parameterNameToIndexes : parametersNameToIndex.entry...
1768307_1
static int computeNewIndex(int index, List<ArrayParameter> arrayParametersSortedAsc) { int newIndex = index; for(ArrayParameter arrayParameter : arrayParametersSortedAsc) { if(index > arrayParameter.parameterIndex) { newIndex = newIndex + arrayParameter.parameterCount - 1; } else { ...
1768307_2
static String updateQueryWithArrayParameters(String parsedQuery, List<ArrayParameter> arrayParametersSortedAsc) { if(arrayParametersSortedAsc.isEmpty()) { return parsedQuery; } StringBuilder sb = new StringBuilder(); Iterator<ArrayParameter> parameterToReplaceIt = arrayParametersSortedAsc.iterat...
1768307_3
@Deprecated public Query createQuery(String query, boolean returnGeneratedKeys) { return new Connection(this, true).createQuery(query, returnGeneratedKeys); }
1768307_4
@Deprecated public Query createQuery(String query, boolean returnGeneratedKeys) { return new Connection(this, true).createQuery(query, returnGeneratedKeys); }
1768307_5
public Connection open(ConnectionSource connectionSource) { return new Connection(this, connectionSource, false); }
1768307_6
@Deprecated public Query createQuery(String query, boolean returnGeneratedKeys) { return new Connection(this, true).createQuery(query, returnGeneratedKeys); }