diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2011-11-17 04:39:41 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2011-11-17 04:39:41 +0000 |
commit | 329d12ecc1367db2fad16c3ea953884c5c78c568 (patch) | |
tree | f0a63a8579bc5ab4db0f6e649c8d6e697521306c /src/java/com/healthmarketscience/jackcess/Column.java | |
parent | ede3f486415327a427e1a6df72983ce8c4a640fa (diff) | |
download | jackcess-329d12ecc1367db2fad16c3ea953884c5c78c568.tar.gz jackcess-329d12ecc1367db2fad16c3ea953884c5c78c568.zip |
refactor table creation
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@596 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/java/com/healthmarketscience/jackcess/Column.java')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Column.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java index 847fd2b..32a67ce 100644 --- a/src/java/com/healthmarketscience/jackcess/Column.java +++ b/src/java/com/healthmarketscience/jackcess/Column.java @@ -1988,10 +1988,10 @@ public class Column implements Comparable<Column> { * @param columns List of Columns to write definitions for */ protected static void writeDefinitions( - ByteBuffer buffer, List<Column> columns, JetFormat format, - Charset charset) + TableCreator creator, ByteBuffer buffer) throws IOException { + List<Column> columns = creator.getColumns(); short columnNumber = (short) 0; short fixedOffset = (short) 0; short variableOffset = (short) 0; @@ -2021,7 +2021,7 @@ public class Column implements Comparable<Column> { if(col.getType().isTextual()) { // this will write 4 bytes (note we don't support writing dbs which // use the text code page) - writeSortOrder(buffer, col.getTextSortOrder(), format); + writeSortOrder(buffer, col.getTextSortOrder(), creator.getFormat()); } else { if(col.getType().getHasScalePrecision()) { buffer.put(col.getPrecision()); // numeric precision @@ -2054,11 +2054,11 @@ public class Column implements Comparable<Column> { columnNumber++; if (LOG.isDebugEnabled()) { LOG.debug("Creating new column def block\n" + ByteUtil.toHexString( - buffer, position, format.SIZE_COLUMN_DEF_BLOCK)); + buffer, position, creator.getFormat().SIZE_COLUMN_DEF_BLOCK)); } } for (Column col : columns) { - Table.writeName(buffer, col.getName(), charset); + Table.writeName(buffer, col.getName(), creator.getCharset()); } } |