java - Is it a nice way to declare common attributes in a super class and later extend it in other classes...? -


i have attributes createddate, createby, modifieddate, modifiedby, deleteddate, deletedby common in of pojo's.

can declare these attributes in super class , later extend in other classes...??

as explained valid inheritance view. since have added hibernate tag, intention columns in database? need these attributes present in common parent table or want add these attributes in each individual table. need choose right inheritance strategy using @inheritance(strategy=inheritancetype) or can consider having mapped super class without own database table. can annotate such class @mappedsuperclass annotation.

regards asheesh


Comments

Popular posts from this blog

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -