What is the benefit of using Email GAE Datastore type instead of String type on POJOs with JDO persistence?

StackOverflow https://stackoverflow.com/questions/19413045

Pergunta

I am migrating an existing web app to GAE, and I am very new on GAE too. I am using App Engine Datastore and JDO as persistence API.

Reading about App Engine Datastore supported types, I noted that there is a Email type.

So, I open the Email class code just to understand what does this class have inside. I get surprised when I saw that it is a simple class with a String field named 'email', and some overrided methods.

My question is: there is some advantage or benefit on using this type instead a simple String field?

By example, using it on some GQL, or JDOQL, or just for more performance on datastore?

Foi útil?

Solução

There's a disadvantage; that type is non-portable to any non-GAE platform. I see no advantage (other than "convenience" of having a type called Email).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top