if (getRetention() != null) sb.append("Retention: ").append(getRetention()).append(","); if (getStorageDescriptor() != null) sb.append("StorageDescriptor: ").append(getStorageDescriptor()).append(","); if (getPartitionKeys() != null) sb.append("PartitionKeys: ").append(getPartitionKeys()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getLastAccessTime() == null) ? 0 : getLastAccessTime().hashCode()); hashCode = prime * hashCode + ((getLastAnalyzedTime() == null) ? 0 : getLastAnalyzedTime().hashCode()); hashCode = prime * hashCode + ((getRetention() == null) ? 0 : getRetention().hashCode()); hashCode = prime * hashCode + ((getStorageDescriptor() == null) ? 0 : getStorageDescriptor().hashCode()); hashCode = prime * hashCode + ((getPartitionKeys() == null) ? 0 : getPartitionKeys().hashCode()); hashCode = prime * hashCode + ((getViewOriginalText() == null) ? 0 : getViewOriginalText().hashCode()); hashCode = prime * hashCode + ((getViewExpandedText() == null) ? 0 : getViewExpandedText().hashCode()); hashCode = prime * hashCode + ((getTableType() == null) ? 0 : getTableType().hashCode()); hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode()); return hashCode; }
@Test public void testConvertTable() { TableInput tblInput = GlueInputConverter.convertTable(testTbl); assertEquals(tblInput.getName(), testTbl.getTableName()); assertEquals(tblInput.getOwner(), testTbl.getOwner()); assertEquals(tblInput.getTableType(), testTbl.getTableType()); assertEquals(tblInput.getParameters(), testTbl.getParameters()); assertColumnList(tblInput.getStorageDescriptor().getColumns(), testTbl.getDataColumns()); assertColumnList(tblInput.getPartitionKeys(), testTbl.getPartitionColumns()); assertStorage(tblInput.getStorageDescriptor(), testTbl.getStorage()); assertEquals(tblInput.getViewExpandedText(), testTbl.getViewExpandedText().get()); assertEquals(tblInput.getViewOriginalText(), testTbl.getViewOriginalText().get()); }
if (other.getRetention() != null && other.getRetention().equals(this.getRetention()) == false) return false; if (other.getStorageDescriptor() == null ^ this.getStorageDescriptor() == null) return false; if (other.getStorageDescriptor() != null && other.getStorageDescriptor().equals(this.getStorageDescriptor()) == false) return false; if (other.getPartitionKeys() == null ^ this.getPartitionKeys() == null)
/** * Marshall the given parameter object. */ public void marshall(TableInput tableInput, ProtocolMarshaller protocolMarshaller) { if (tableInput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(tableInput.getName(), NAME_BINDING); protocolMarshaller.marshall(tableInput.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(tableInput.getOwner(), OWNER_BINDING); protocolMarshaller.marshall(tableInput.getLastAccessTime(), LASTACCESSTIME_BINDING); protocolMarshaller.marshall(tableInput.getLastAnalyzedTime(), LASTANALYZEDTIME_BINDING); protocolMarshaller.marshall(tableInput.getRetention(), RETENTION_BINDING); protocolMarshaller.marshall(tableInput.getStorageDescriptor(), STORAGEDESCRIPTOR_BINDING); protocolMarshaller.marshall(tableInput.getPartitionKeys(), PARTITIONKEYS_BINDING); protocolMarshaller.marshall(tableInput.getViewOriginalText(), VIEWORIGINALTEXT_BINDING); protocolMarshaller.marshall(tableInput.getViewExpandedText(), VIEWEXPANDEDTEXT_BINDING); protocolMarshaller.marshall(tableInput.getTableType(), TABLETYPE_BINDING); protocolMarshaller.marshall(tableInput.getParameters(), PARAMETERS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (getRetention() != null) sb.append("Retention: ").append(getRetention()).append(","); if (getStorageDescriptor() != null) sb.append("StorageDescriptor: ").append(getStorageDescriptor()).append(","); if (getPartitionKeys() != null) sb.append("PartitionKeys: ").append(getPartitionKeys()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getLastAccessTime() == null) ? 0 : getLastAccessTime().hashCode()); hashCode = prime * hashCode + ((getLastAnalyzedTime() == null) ? 0 : getLastAnalyzedTime().hashCode()); hashCode = prime * hashCode + ((getRetention() == null) ? 0 : getRetention().hashCode()); hashCode = prime * hashCode + ((getStorageDescriptor() == null) ? 0 : getStorageDescriptor().hashCode()); hashCode = prime * hashCode + ((getPartitionKeys() == null) ? 0 : getPartitionKeys().hashCode()); hashCode = prime * hashCode + ((getViewOriginalText() == null) ? 0 : getViewOriginalText().hashCode()); hashCode = prime * hashCode + ((getViewExpandedText() == null) ? 0 : getViewExpandedText().hashCode()); hashCode = prime * hashCode + ((getTableType() == null) ? 0 : getTableType().hashCode()); hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode()); return hashCode; }
@Test public void testConvertTable() { TableInput tblInput = GlueInputConverter.convertTable(testTbl); assertEquals(tblInput.getName(), testTbl.getTableName()); assertEquals(tblInput.getOwner(), testTbl.getOwner()); assertEquals(tblInput.getTableType(), testTbl.getTableType()); assertEquals(tblInput.getParameters(), testTbl.getParameters()); assertColumnList(tblInput.getStorageDescriptor().getColumns(), testTbl.getDataColumns()); assertColumnList(tblInput.getPartitionKeys(), testTbl.getPartitionColumns()); assertStorage(tblInput.getStorageDescriptor(), testTbl.getStorage()); assertEquals(tblInput.getViewExpandedText(), testTbl.getViewExpandedText().get()); assertEquals(tblInput.getViewOriginalText(), testTbl.getViewOriginalText().get()); }
@Test public void testConvertTable() { TableInput tblInput = GlueInputConverter.convertTable(testTbl); assertEquals(tblInput.getName(), testTbl.getTableName()); assertEquals(tblInput.getOwner(), testTbl.getOwner()); assertEquals(tblInput.getTableType(), testTbl.getTableType()); assertEquals(tblInput.getParameters(), testTbl.getParameters()); assertColumnList(tblInput.getStorageDescriptor().getColumns(), testTbl.getDataColumns()); assertColumnList(tblInput.getPartitionKeys(), testTbl.getPartitionColumns()); assertStorage(tblInput.getStorageDescriptor(), testTbl.getStorage()); assertEquals(tblInput.getViewExpandedText(), testTbl.getViewExpandedText().get()); assertEquals(tblInput.getViewOriginalText(), testTbl.getViewOriginalText().get()); }
@Test public void testConvertTable() { TableInput tblInput = GlueInputConverter.convertTable(testTbl); assertEquals(tblInput.getName(), testTbl.getTableName()); assertEquals(tblInput.getOwner(), testTbl.getOwner()); assertEquals(tblInput.getTableType(), testTbl.getTableType()); assertEquals(tblInput.getParameters(), testTbl.getParameters()); assertColumnList(tblInput.getStorageDescriptor().getColumns(), testTbl.getDataColumns()); assertColumnList(tblInput.getPartitionKeys(), testTbl.getPartitionColumns()); assertStorage(tblInput.getStorageDescriptor(), testTbl.getStorage()); assertEquals(tblInput.getViewExpandedText(), testTbl.getViewExpandedText().get()); assertEquals(tblInput.getViewOriginalText(), testTbl.getViewOriginalText().get()); }
if (other.getRetention() != null && other.getRetention().equals(this.getRetention()) == false) return false; if (other.getStorageDescriptor() == null ^ this.getStorageDescriptor() == null) return false; if (other.getStorageDescriptor() != null && other.getStorageDescriptor().equals(this.getStorageDescriptor()) == false) return false; if (other.getPartitionKeys() == null ^ this.getPartitionKeys() == null)
/** * Marshall the given parameter object. */ public void marshall(TableInput tableInput, ProtocolMarshaller protocolMarshaller) { if (tableInput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(tableInput.getName(), NAME_BINDING); protocolMarshaller.marshall(tableInput.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(tableInput.getOwner(), OWNER_BINDING); protocolMarshaller.marshall(tableInput.getLastAccessTime(), LASTACCESSTIME_BINDING); protocolMarshaller.marshall(tableInput.getLastAnalyzedTime(), LASTANALYZEDTIME_BINDING); protocolMarshaller.marshall(tableInput.getRetention(), RETENTION_BINDING); protocolMarshaller.marshall(tableInput.getStorageDescriptor(), STORAGEDESCRIPTOR_BINDING); protocolMarshaller.marshall(tableInput.getPartitionKeys(), PARTITIONKEYS_BINDING); protocolMarshaller.marshall(tableInput.getViewOriginalText(), VIEWORIGINALTEXT_BINDING); protocolMarshaller.marshall(tableInput.getViewExpandedText(), VIEWEXPANDEDTEXT_BINDING); protocolMarshaller.marshall(tableInput.getTableType(), TABLETYPE_BINDING); protocolMarshaller.marshall(tableInput.getParameters(), PARAMETERS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }