/** * {@inheritDoc} */ @Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + ( ( attributeName == null ) ? 0 : attributeName.hashCode() ); hash = 37 * hash + ( ( this.result == null ) ? 0 : this.result.hashCode() ); return hash; }
/** * {@inheritDoc} */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( sortRespLen ) ); BerValue.encodeEnumerated( buffer, getSortResult().getVal() ); if ( getAttributeName() != null ) { BerValue.encode( buffer, getAttributeName() ); } return buffer; }
/** * {@inheritDoc} */ @Override protected void setIntegerValue( int value, Asn1Container container ) { SortResponseContainer sortRespContainer = ( SortResponseContainer ) container; SortResultCode code = SortResultCode.get( value ); sortRespContainer.getControl().setSortResult( code ); sortRespContainer.setGrammarEndAllowed( true ); } }
/** * {@inheritDoc} */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( sortRespLen ) ); BerValue.encodeEnumerated( buffer, getSortResult().getVal() ); if ( getAttributeName() != null ) { BerValue.encode( buffer, getAttributeName() ); } return buffer; }
/** * {@inheritDoc} */ @Override protected void setIntegerValue( int value, Asn1Container container ) { SortResponseContainer sortRespContainer = ( SortResponseContainer ) container; SortResultCode code = SortResultCode.get( value ); sortRespContainer.getControl().setSortResult( code ); sortRespContainer.setGrammarEndAllowed( true ); } }
/** * {@inheritDoc} */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { if ( buffer == null ) { throw new EncoderException( I18n.err( I18n.ERR_08000_CANNOT_PUT_A_PDU_IN_NULL_BUFFER ) ); } buffer.put( UniversalTag.SEQUENCE.getValue() ); buffer.put( TLV.getBytes( sortRespLen ) ); BerValue.encodeEnumerated( buffer, getSortResult().getVal() ); if ( getAttributeName() != null ) { BerValue.encode( buffer, getAttributeName() ); } return buffer; }
/** * {@inheritDoc} */ @Override protected void setIntegerValue( int value, Asn1Container container ) { SortResponseContainer sortRespContainer = ( SortResponseContainer ) container; SortResultCode code = SortResultCode.get( value ); sortRespContainer.getControl().setSortResult( code ); sortRespContainer.setGrammarEndAllowed( true ); } }
/** * {@inheritDoc} */ @Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + ( ( attributeName == null ) ? 0 : attributeName.hashCode() ); hash = 37 * hash + ( ( this.result == null ) ? 0 : this.result.hashCode() ); return hash; }
final SortResponse c = (SortResponse) responseControl; ctl = new SortResponseControl( ResultCode.valueOf(c.getSortResult().getVal()), c.getAttributeName(), c.isCritical()); } else if (PagedResultsControl.OID.equals(responseControl.getOid())) { final PagedResults c = (PagedResults) responseControl;
/** * {@inheritDoc} */ @Override public int hashCode() { int hash = super.hashCode(); hash = 37 * hash + ( ( attributeName == null ) ? 0 : attributeName.hashCode() ); hash = 37 * hash + ( ( this.result == null ) ? 0 : this.result.hashCode() ); return hash; }