Sha256: f59536c808921da8294b8985135f23cab1ed321f2b7f8fd765a997f5f77ad406
Contents?: true
Size: 1.19 KB
Versions: 144
Compression:
Stored size: 1.19 KB
Contents
module CassandraObject module Identity # Key factories need to support 3 operations class AbstractKeyFactory # Next key takes an object and returns the key object it should use. # object will be ignored with synthetic keys but could be useful with natural ones # # @param [CassandraObject::Base] the object that needs a new key # @return [CassandraObject::Identity::Key] the key # def next_key(object) raise NotImplementedError, "#{self.class.name}#next_key isn't implemented." end # Parse should create a new key object from the 'to_param' format # # @param [String] the result of calling key.to_param # @return [CassandraObject::Identity::Key] the parsed key # def parse(string) raise NotImplementedError, "#{self.class.name}#parse isn't implemented." end # create should create a new key object from the cassandra format. # # @param [String] the result of calling key.to_s # @return [CassandraObject::Identity::Key] the key # def create(string) raise NotImplementedError, "#{self.class.name}#create isn't implemented." end end end end
Version data entries
144 entries across 144 versions & 3 rubygems