You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComplexColumnImpl.java 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. Copyright (c) 2014 James Ahlborn
  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;
  14. import java.io.IOException;
  15. import com.healthmarketscience.jackcess.complex.ComplexColumnInfo;
  16. import com.healthmarketscience.jackcess.complex.ComplexValue;
  17. import com.healthmarketscience.jackcess.impl.complex.ComplexColumnInfoImpl;
  18. /**
  19. * ColumnImpl subclass which is used for complex data types.
  20. *
  21. * @author James Ahlborn
  22. * @usage _advanced_class_
  23. */
  24. class ComplexColumnImpl extends ColumnImpl
  25. {
  26. /** additional information specific to complex columns */
  27. private final ComplexColumnInfo<? extends ComplexValue> _complexInfo;
  28. ComplexColumnImpl(InitArgs args) throws IOException
  29. {
  30. super(args);
  31. _complexInfo = ComplexColumnSupport.create(this, args.buffer, args.offset);
  32. }
  33. @Override
  34. void postTableLoadInit() throws IOException {
  35. if(_complexInfo != null) {
  36. ((ComplexColumnInfoImpl<? extends ComplexValue>)_complexInfo)
  37. .postTableLoadInit();
  38. }
  39. super.postTableLoadInit();
  40. }
  41. @Override
  42. public ComplexColumnInfo<? extends ComplexValue> getComplexInfo() {
  43. return _complexInfo;
  44. }
  45. }