In first case i.e. @Entity
or @Id
these are Java annotations - they are used in the Java classes for different purposes (according to their destination). You probably showing as a part of Ebean model, check its docs to see what they do, sample:
package models;
import java.util.*;
import javax.persistence.*;
import com.avaje.ebean.Model;
import play.data.format.*;
import play.data.validation.*;
@Entity
public class Task extends Model {
@Id
@Constraints.Min(10)
public Long id;
@Constraints.Required
public String name;
public boolean done;
@Formats.DateTime(pattern="dd/MM/yyyy")
public Date dueDate = new Date();
public static Finder<Long, Task> find = new Finder<Long,Task>(Task.class);
}
Second at
used in the Twirl templates indicates the named variable or beginning of the dynamic statement in general i.e.:
<title>@pageTitle</title>
<ul>
@for((item, index) <- myItems.zipWithIndex) {
<li>Item @index is @item</li>
}
</ul>
Where @pageTitle
, @index
and @item
= varaibles,
@for(...){ ... }
it's just a loop's block, observe that myItems
dosen't require the @
symbol, as it's recognized as Scala argument)
It's described in the Twirl documentation
As you can see @
char in both cases hasn't any connection, they has absolutely different meaning.
To get better understanding first get familiar with linked Twirl documentation, and with Play documentation in general. Then study several sample apps from prepared by Play team, to realize which is which.