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.

ComplexColumnInfo.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. Copyright (c) 2013 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.complex;
  14. import java.io.IOException;
  15. import java.util.Collection;
  16. import java.util.List;
  17. import java.util.Map;
  18. import com.healthmarketscience.jackcess.Row;
  19. /**
  20. * Base class for the additional information tracked for complex columns.
  21. *
  22. * @author James Ahlborn
  23. */
  24. public interface ComplexColumnInfo<V extends ComplexValue>
  25. {
  26. public ComplexDataType getType();
  27. public int countValues(int complexValueFk) throws IOException;
  28. public List<Row> getRawValues(int complexValueFk)
  29. throws IOException;
  30. public List<Row> getRawValues(int complexValueFk,
  31. Collection<String> columnNames)
  32. throws IOException;
  33. public List<V> getValues(ComplexValueForeignKey complexValueFk)
  34. throws IOException;
  35. public ComplexValue.Id addRawValue(Map<String,?> rawValue)
  36. throws IOException;
  37. public ComplexValue.Id addValue(V value) throws IOException;
  38. public void addValues(Collection<? extends V> values) throws IOException;
  39. public ComplexValue.Id updateRawValue(Row rawValue) throws IOException;
  40. public ComplexValue.Id updateValue(V value) throws IOException;
  41. public void updateValues(Collection<? extends V> values) throws IOException;
  42. public void deleteRawValue(Row rawValue) throws IOException;
  43. public void deleteValue(V value) throws IOException;
  44. public void deleteValues(Collection<? extends V> values) throws IOException;
  45. public void deleteAllValues(int complexValueFk) throws IOException;
  46. public void deleteAllValues(ComplexValueForeignKey complexValueFk)
  47. throws IOException;
  48. }