class Rubernate::Entity
Attributes
proxy_class[RW]
Public Class Methods
all()
click to toggle source
# File lib/rubernate/entity.rb, line 12 def self.all() Connection.entity_manager.create_query("SELECT e FROM #{self} as e ").result_list end
by_hql(hql)
click to toggle source
# File lib/rubernate/entity.rb, line 16 def self.by_hql(hql) Connection.entity_manager.create_query(hql) end
find(id)
click to toggle source
# File lib/rubernate/entity.rb, line 8 def self.find(id) Connection.entity_manager.create_query("SELECT e FROM #{self} as e where e.id = :id").set_parameter(id).get_single_result end