public Object getFieldValue(_Fields field) { switch (field) { case CLIENT_HOST_NAME: return getClientHostName(); case CLIENT_ID: return getClientID(); case SECURITY: return getSecurity(); case USER_NAME: return getUserName(); case PASSWORD: return getPassword(); case TOKEN_SIZE: return Integer.valueOf(getTokenSize()); case USE_STRING_FOR_DECIMAL: return Boolean.valueOf(isUseStringForDecimal()); case PROPERTIES: return getProperties(); } throw new IllegalStateException(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case CLIENT_HOST_NAME: return isSetClientHostName(); case CLIENT_ID: return isSetClientID(); case SECURITY: return isSetSecurity(); case USER_NAME: return isSetUserName(); case PASSWORD: return isSetPassword(); case TOKEN_SIZE: return isSetTokenSize(); case USE_STRING_FOR_DECIMAL: return isSetUseStringForDecimal(); case PROPERTIES: return isSetProperties(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public OpenConnectionArgs(OpenConnectionArgs other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetClientHostName()) { this.clientHostName = other.clientHostName; } if (other.isSetClientID()) { this.clientID = other.clientID; } if (other.isSetSecurity()) { this.security = other.security; } if (other.isSetUserName()) { this.userName = other.userName; } if (other.isSetPassword()) { this.password = other.password; } this.tokenSize = other.tokenSize; this.useStringForDecimal = other.useStringForDecimal; if (other.isSetProperties()) { Map<String,String> __this__properties = new HashMap<String,String>(other.properties); this.properties = __this__properties; } }
if (arguments.isSetUserName()) { props.put(Attribute.USERNAME_ATTR, arguments.getUserName()); if (arguments.isSetPassword()) { props.put(Attribute.PASSWORD_ATTR, arguments.getPassword()); if (arguments.isSetProperties()) { props.putAll(arguments.getProperties()); clientHost = arguments.getClientHostName(); clientId = arguments.getClientID();
if (args.getSecurity() == SecurityMechanism.PLAIN || args.getSecurity() == SecurityMechanism.DIFFIE_HELLMAN) { int tokenSize = gfxdConstants.DEFAULT_SESSION_TOKEN_SIZE; if (args.isSetTokenSize()) { if (args.getTokenSize() < tokenSize) { "specified connection token size " + args.getTokenSize() + " smaller than minimum allowed of " + tokenSize); tokenSize = args.getTokenSize(); "unsupported security mechanism " + args.getSecurity()); this.clientHostName = args.getClientHostName(); this.clientID = args.getClientID(); this.userName = args.getUserName(); this.useStringForDecimal = args.isSetUseStringForDecimal() && args.useStringForDecimal; this.reusableStatement = (EmbedStatement)conn.createStatement();
if (isSetUserName()) { if (!first) sb.append(", "); sb.append("userName:"); if (isSetPassword()) { if (!first) sb.append(", "); sb.append("password:"); if (isSetTokenSize()) { if (!first) sb.append(", "); sb.append("tokenSize:"); first = false; if (isSetUseStringForDecimal()) { if (!first) sb.append(", "); sb.append("useStringForDecimal:"); first = false; if (isSetProperties()) { if (!first) sb.append(", "); sb.append("properties:");
connArgs.setClientHostName(hostName).setClientID( hostId + '|' + currentThread.getName() + "<0x" + Long.toHexString(currentThread.getId()) + '>'); this.connArgs = connArgs; Map<String, String> props = connArgs.getProperties(); String propValue; binaryProtocol, useSSL)); connArgs.setProperties(props);
/** * {@inheritDoc} */ @Override public String getUserName() throws SQLException { return this.service.connArgs.getUserName(); }
if (arguments.isSetUserName()) { props.put(Attribute.USERNAME_ATTR, arguments.getUserName()); if (arguments.isSetPassword()) { props.put(Attribute.PASSWORD_ATTR, arguments.getPassword()); if (arguments.isSetProperties()) { props.putAll(arguments.getProperties()); clientHost = arguments.getClientHostName(); clientId = arguments.getClientID();
if (args.getSecurity() == SecurityMechanism.PLAIN || args.getSecurity() == SecurityMechanism.DIFFIE_HELLMAN) { int tokenSize = gfxdConstants.DEFAULT_SESSION_TOKEN_SIZE; if (args.isSetTokenSize()) { if (args.getTokenSize() < tokenSize) { "specified connection token size " + args.getTokenSize() + " smaller than minimum allowed of " + tokenSize); tokenSize = args.getTokenSize(); "unsupported security mechanism " + args.getSecurity()); this.clientHostName = args.getClientHostName(); this.clientID = args.getClientID(); this.userName = args.getUserName(); this.useStringForDecimal = args.isSetUseStringForDecimal() && args.useStringForDecimal; this.reusableStatement = (EmbedStatement)conn.createStatement();
oprot.writeI32(struct.security.getValue()); BitSet optionals = new BitSet(); if (struct.isSetUserName()) { optionals.set(0); if (struct.isSetPassword()) { optionals.set(1); if (struct.isSetTokenSize()) { optionals.set(2); if (struct.isSetUseStringForDecimal()) { optionals.set(3); if (struct.isSetProperties()) { optionals.set(4); if (struct.isSetUserName()) { oprot.writeString(struct.userName); if (struct.isSetPassword()) { oprot.writeString(struct.password); if (struct.isSetTokenSize()) { oprot.writeI32(struct.tokenSize); if (struct.isSetUseStringForDecimal()) { oprot.writeBool(struct.useStringForDecimal);
boolean this_present_clientHostName = true && this.isSetClientHostName(); boolean that_present_clientHostName = true && that.isSetClientHostName(); if (this_present_clientHostName || that_present_clientHostName) { if (!(this_present_clientHostName && that_present_clientHostName)) boolean this_present_clientID = true && this.isSetClientID(); boolean that_present_clientID = true && that.isSetClientID(); if (this_present_clientID || that_present_clientID) { if (!(this_present_clientID && that_present_clientID)) boolean this_present_security = true && this.isSetSecurity(); boolean that_present_security = true && that.isSetSecurity(); if (this_present_security || that_present_security) { if (!(this_present_security && that_present_security)) boolean this_present_userName = true && this.isSetUserName(); boolean that_present_userName = true && that.isSetUserName(); if (this_present_userName || that_present_userName) { if (!(this_present_userName && that_present_userName)) boolean this_present_password = true && this.isSetPassword(); boolean that_present_password = true && that.isSetPassword(); if (this_present_password || that_present_password) { if (!(this_present_password && that_present_password)) boolean this_present_tokenSize = true && this.isSetTokenSize(); boolean that_present_tokenSize = true && that.isSetTokenSize(); if (this_present_tokenSize || that_present_tokenSize) { if (!(this_present_tokenSize && that_present_tokenSize))
public void write(org.apache.thrift.protocol.TProtocol oprot, OpenConnectionArgs struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetUserName()) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.userName); if (struct.isSetPassword()) { oprot.writeFieldBegin(PASSWORD_FIELD_DESC); oprot.writeString(struct.password); if (struct.isSetTokenSize()) { oprot.writeFieldBegin(TOKEN_SIZE_FIELD_DESC); oprot.writeI32(struct.tokenSize); oprot.writeFieldEnd(); if (struct.isSetUseStringForDecimal()) { oprot.writeFieldBegin(USE_STRING_FOR_DECIMAL_FIELD_DESC); oprot.writeBool(struct.useStringForDecimal); if (struct.isSetProperties()) { oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
lastComparison = Boolean.valueOf(isSetClientHostName()).compareTo(other.isSetClientHostName()); if (lastComparison != 0) { return lastComparison; if (isSetClientHostName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientHostName, other.clientHostName); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetClientID()).compareTo(other.isSetClientID()); if (lastComparison != 0) { return lastComparison; if (isSetClientID()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientID, other.clientID); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetSecurity()).compareTo(other.isSetSecurity()); if (lastComparison != 0) { return lastComparison; if (isSetSecurity()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.security, other.security); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); if (lastComparison != 0) { return lastComparison; if (isSetUserName()) {