The direct answer is not, the last topic Limitations in the doc says that.
Maybe the best for you is to apply some architectural pattern in your project and keep the logic in an entity method.