After going through all possible API's, I got a solution to retrieve component template based on component template names.
Mainly you need to use ItemTitleCriteria
to retrieving the component templates by names.
Thanks to @NickoliRoussakov for the clue given.
using (ItemTypeCriteria mItemTypeCriteria = new ItemTypeCriteria(32))
{
using (ItemTitleCriteria mItemTitleCriteria = new ItemTitleCriteria("My Component Template"))
{
using (PublicationCriteria mPublicationCriteria = new PublicationCriteria(123))
{
AndCriteria mTitleCriteria = CriteriaFactory.And(mItemTypeCriteria, mItemTitleCriteria);
AndCriteria mTemplateCriteria = CriteriaFactory.And(mTitleCriteria, mPublicationCriteria);
Tridion.ContentDelivery.Meta.IItem[] result = new Query(mTemplateCriteria).ExecuteEntityQuery();
if (result.Any())
{
Tridion.ContentDelivery.Meta.IItem template = result.FirstOrDefault();
String templateTitle = template.Title;
String templateId = template.Id.ToString();
}
}
}
}
Note that above solution might have performance impact. Please test it throughly before using.
Better option would be, by maintaining Component Template ID's in a configuration file with all the required template id's according to the environment and retrieve the component presentations.