First you need to get the list of the columns in that class. You can do that by using org.hibernate.metadata.ClassMetadata Entity :
ClassMetadata classMetadata = sessionFactory.getClassMetadata(AppTaskConfig.class);
String[] propertyNames = classMetadata.getPropertyNames();
where propertyNames is an array of Strings representing the property names of AppTaskConfig.
Now using Hibernate org.hibernate.cfg.Configuration object you can find the column names of the properties:
for (String property : propertyNames) {
Configuration configuration = sessionFactoryBean.getConfiguration();
PersistentClass persistentClass = configuration
.getClassMapping(Details.class.getName());
String columnName = ((Column) persistentClass.getProperty(property)
.getColumnIterator().next()).getName();
}
Also to skip the mapping you can simply use @Transient annotation on your entity.