Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

PassthroughQueryImpl.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. Copyright (c) 2008 Health Market Science, Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package com.healthmarketscience.jackcess.impl.query;
  14. import java.util.List;
  15. import com.healthmarketscience.jackcess.query.PassthroughQuery;
  16. /**
  17. * Concrete Query subclass which represents a query which will be executed via
  18. * ODBC.
  19. *
  20. * @author James Ahlborn
  21. */
  22. public class PassthroughQueryImpl extends QueryImpl implements PassthroughQuery
  23. {
  24. public PassthroughQueryImpl(String name, List<Row> rows, int objectId,
  25. int objectFlag) {
  26. super(name, rows, objectId, objectFlag, Type.PASSTHROUGH);
  27. }
  28. public String getConnectionString() {
  29. return getTypeRow().name1;
  30. }
  31. public String getPassthroughString() {
  32. return getTypeRow().expression;
  33. }
  34. @Override
  35. protected boolean supportsStandardClauses() {
  36. return false;
  37. }
  38. @Override
  39. protected void toSQLString(StringBuilder builder)
  40. {
  41. String pt = getPassthroughString();
  42. if(pt != null) {
  43. builder.append(pt);
  44. }
  45. }
  46. }