Java 类org.springframework.data.annotation.Transient 实例源码

项目:konker-platform    文件:RestTransformationStepVO.java   
@Transient
@Override
public RestTransformationStepVO apply(TransformationStep t) {
    RestTransformationStepVO r = new RestTransformationStepVO();
    r.setType(IntegrationType.REST);
    r.setMethod((String) t.getAttributes()
            .get(RestTransformationStep.REST_ATTRIBUTE_METHOD));
    r.setUsername((String) t.getAttributes()
            .get(RestTransformationStep.REST_USERNAME_ATTRIBUTE_NAME));
    r.setPassword((String) t.getAttributes()
            .get(RestTransformationStep.REST_PASSWORD_ATTRIBUTE_NAME));
    r.setUrl((String) t.getAttributes()
            .get(RestTransformationStep.REST_URL_ATTRIBUTE_NAME));
    r.setHeaders((Map) t.getAttributes()
            .get(RestTransformationStep.REST_ATTRIBUTE_HEADERS));
    return r;
}
项目:opencucina    文件:User.java   
/**
 * Get granted authorities as collection of
 * SimpleGrantedAuthorities(roleName) for each role:
 *
 * TODO should be used by permission manager
 *
 * @return JAVADOC.
 */
@SuppressWarnings("unchecked")
@Transient
public Collection<?extends GrantedAuthority> getAuthorities() {
    Collection<Permission> permissions = getPermissions();

    if (permissions == null) {
        return DEFAULT_AUTHORITIES;
    }

    return CollectionUtils.collect(permissions,
        new Transformer() {
            @Override
            public Object transform(Object arg0) {
                Permission permission = (Permission) arg0;
                BeanWrapper beanWrapper = new BeanWrapperImpl(permission.getRole());
                String name = (String) beanWrapper.getPropertyValue("name");

                return new SimpleGrantedAuthority(name);
            }
        });
}
项目:travel-agency    文件:Conversation.java   
@Transient
public boolean hasAssignedBot(){
    return participants.stream()
                .filter(Participant::isBot)
                .findFirst()
                .isPresent();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public boolean hasAssignedAgent(){
    return participants.stream()
                .filter(Participant::isAgent)
                .findFirst()
                .isPresent();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public String getUserName(){
    return this.participants.stream()
                .filter(Participant::isUser)
                .map(Participant::getName)
                .findFirst()
                .orElse("NOT ASSIGNED");
}
项目:travel-agency    文件:Conversation.java   
@Transient
public String getAgentName(){
    return this.participants.stream()
                .filter(Participant::isAgent)
                .map(Participant::getName)
                .findFirst()
                .orElse("NOT ASSIGNED");
}
项目:travel-agency    文件:Conversation.java   
@Transient
public void setUserPhoneNumber(String phoneNumber){
    this.phoneNumber = phoneNumber;
    Optional<Participant> user = findParticipantByType(ParticipantType.USER);
    if(user.isPresent()){
        user.get().setPhoneNumber(phoneNumber);
    }
}
项目:travel-agency    文件:Conversation.java   
@Transient
public boolean isAnonymous(){
    return this.participants.stream()
                .filter(Participant::isUser)
                .filter( p -> Participant.ANNONYMUS_USER.equals(p.getName()) )
                .findFirst()
                .isPresent();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Participant assignBot(){
    if(hasAssignedBot()){
       return getBot().get();
    }

    Participant bot = new Participant();
    bot.setType(ParticipantType.BOT);
    bot.setName("Bot");
    bot.setId(UUID.randomUUID().toString());
    participants.add(bot);
    return bot;
}
项目:travel-agency    文件:AdminUser.java   
@Transient
public Participant toParticipant(){
    Participant participant = new Participant();
    participant.setId(this.getId());
    participant.setName(this.getFullName());
    participant.setType(ParticipantType.AGENT);
    participant.setPhoneNumber(this.getPhone());
    return participant;
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public boolean isUserMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isUser()){
        return true;
    }
    return false;
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public boolean isBotMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isBot()){
        return true;
    }
    return false;
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public boolean isAgentMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isAgent()){
        return true;
    }
    return false;
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public String getParticipantName(){
    if(conversation != null)
        return conversation.findParticipantById(participantId).get().getName();

    return "";
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public Participant getParticipant(){
    if(conversation != null)
       return conversation.getParticipants().stream()
                        .filter( p -> p.getId().equals(participantId))
                        .findFirst()
                        .orElse( null );
    return null;
}
项目:travel-agency    文件:ConversationMessage.java   
@Transient
public Optional<String> getParticipantPhoneNumber(){
    Participant participant = getParticipant();
    if(participant != null){
        return Optional.ofNullable(participant.getPhoneNumber());
    }
    return Optional.empty();
}
项目:konker-platform    文件:RestTransformationVO.java   
@Transient
@Override
public RestTransformationVO apply(Transformation t) {
    RestTransformationVO r = new RestTransformationVO();
    r.setId(t.getId());
    r.setGuid(t.getGuid());
    r.setName(t.getName());
    r.setDescription(t.getDescription());
    r.setSteps(new RestTransformationStepVO().apply(t.getSteps()));
    return r;
}
项目:konker-platform    文件:SerializableVO.java   
/**
 * Serialize list of objects from DB to VO
 * @param t
 * @return List<R>
 */
@Transient
default List<R> apply(List<T> t) {
    return t.parallelStream()
                .map(i -> apply(i))
                .collect(Collectors.toList());

}
项目:spring-data-snowdrop    文件:GenericEntityToModelMapper.java   
@Override
public boolean matches(Field field) {
    return super.matches(field) && field.getAnnotation(Transient.class) == null;
}
项目:Spring-Security-Third-Edition    文件:CalendarUser.java   
@JsonIgnore
@Transient
public void addRole(Role role){
    this.roles.add(role);
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Optional<Participant> findParticipantById(String id){
    return participants.stream()
            .filter( p -> p.getId().equals(id))
            .findFirst();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Optional<Participant> findParticipantByType(ParticipantType type){
    return participants.stream()
            .filter( p -> p.getType() == type)
            .findFirst();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Optional<Participant> findParticipantByPhone(String phoneNumber){
    return participants.stream()
            .filter( p ->  phoneNumber.equals(p.getPhoneNumber()) )
            .findFirst();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public boolean hasPhoneNumberAssigned(){
    return StringUtils.hasText(this.phoneNumber);
}
项目:travel-agency    文件:Conversation.java   
@Transient
public void incrementNumberInquires(){
    this.numberRequests++;
}
项目:travel-agency    文件:Conversation.java   
@Transient
public void incrementNameInquires(){
    this.nameRequests++;
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Optional<Participant> getBot(){
    return this.participants.stream()
                .filter(Participant::isBot)
                .findFirst();
}
项目:travel-agency    文件:Conversation.java   
@Transient
public Optional<Participant> getUser(){
    return this.participants.stream()
                .filter(Participant::isUser)
                .findFirst();
}
项目:travel-agency    文件:AdminUser.java   
@Transient
public String getFullName(){
    return this.firstName + " " + this.getLastName();
}
项目:travel-agency    文件:Participant.java   
@Transient
public boolean isBot(){
   return this.type == ParticipantType.BOT;
}
项目:travel-agency    文件:Participant.java   
@Transient
public boolean isUser(){
   return this.type == ParticipantType.USER;
}
项目:travel-agency    文件:Participant.java   
@Transient
public boolean isAgent(){
    return this.type == ParticipantType.AGENT;
}
项目:spring-data-mybatis    文件:LongId.java   
@Override
@Transient
public boolean isNew() {
    return null == getId();
}
项目:TaskMadness    文件:Node.java   
@Transient
public Node getLeft() {
    return this.children == null? null : this.children[0];
}
项目:TaskMadness    文件:Node.java   
@Transient
public Node getRight() {
    return this.children == null? null : this.children[1];
}
项目:switchman    文件:AbTestConfiguration.java   
@JsonIgnore
@Override
@Transient
public String getId() {
  return getName();
}
项目:switchman    文件:AbTestConfiguration.java   
@Transient
public boolean isActive() {
  DateTime now = DateTime.now();
  return (getFrom() != null) && (getTo() != null) && getFrom().isBefore(now) && getTo().isAfter(now);
}
项目:fnf.clientapi    文件:PowerControl.java   
/**
 * @return the original timestamp
 */
@Transient
public long getTimeStamp() {
    return timeStamp;
}
项目:fnf.clientapi    文件:SensorEvent.java   
/**
 * @return the time-stamp when this event happened
 */
@Transient
public long getTimeStamp() {
    return timeStamp;
}
项目:fnf.clientapi    文件:VelocityMessage.java   
@Transient
public long getTimeStamp() {
    return timeStamp;
}