Function getEntitySequence