#NEWLINE# def __setattr__( self , name , value ) : #NEWLINE# #INDENT# '\n        Overides the setattr method for the object. We do this so\n        that we can validate the field as it gets assigned.\n        ' #NEWLINE# if ( name in self . alpha_numeric_fields ) : #NEWLINE# #INDENT# if ( ( name == 'ind_name' ) and ( self . std_ent_cls_code in [ 'CIE' , 'MTE' ] ) ) : #NEWLINE# #INDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'ind_name' ) : #NEWLINE# #INDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( name == 'chk_serial_num' ) and ( self . std_ent_cls_code_list == 'POP' ) ) : #NEWLINE# #INDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'chk_serial_num' ) : #NEWLINE# #INDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( name in self . numeric_fields ) : #NEWLINE# #INDENT# if ( name == 'recv_dfi_id' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# value = self . validate_numeric_field ( value , self . field_lengths [ name ] [ 0 ] ) #NEWLINE# #UNINDENT# except AchError : #NEWLINE# #INDENT# value = self . validate_numeric_field ( name , self . field_lengths [ name ] [ 1 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# value = self . validate_numeric_field ( value , self . field_lengths [ name ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( name == 'std_ent_cls_code' ) and ( value in self . std_ent_cls_code_list ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise AchError ( ( '%s not in numeric_fields or alpha_numeric_fields' % name ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# super ( EntryDetail , self ) . __setattr__ ( name , value )