當前位置: 首頁>>代碼示例>>Java>>正文


Java Transient類代碼示例

本文整理匯總了Java中org.springframework.data.annotation.Transient的典型用法代碼示例。如果您正苦於以下問題:Java Transient類的具體用法?Java Transient怎麽用?Java Transient使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Transient類屬於org.springframework.data.annotation包,在下文中一共展示了Transient類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: apply

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@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;
}
 
開發者ID:KonkerLabs,項目名稱:konker-platform,代碼行數:18,代碼來源:RestTransformationStepVO.java

示例2: transform

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
/**
 * 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);
            }
        });
}
 
開發者ID:cucina,項目名稱:opencucina,代碼行數:30,代碼來源:User.java

示例3: hasAssignedBot

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean hasAssignedBot(){
    return participants.stream()
                .filter(Participant::isBot)
                .findFirst()
                .isPresent();
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:8,代碼來源:Conversation.java

示例4: hasAssignedAgent

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean hasAssignedAgent(){
    return participants.stream()
                .filter(Participant::isAgent)
                .findFirst()
                .isPresent();
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:8,代碼來源:Conversation.java

示例5: getUserName

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public String getUserName(){
    return this.participants.stream()
                .filter(Participant::isUser)
                .map(Participant::getName)
                .findFirst()
                .orElse("NOT ASSIGNED");
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:Conversation.java

示例6: getAgentName

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public String getAgentName(){
    return this.participants.stream()
                .filter(Participant::isAgent)
                .map(Participant::getName)
                .findFirst()
                .orElse("NOT ASSIGNED");
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:Conversation.java

示例7: setUserPhoneNumber

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public void setUserPhoneNumber(String phoneNumber){
    this.phoneNumber = phoneNumber;
    Optional<Participant> user = findParticipantByType(ParticipantType.USER);
    if(user.isPresent()){
        user.get().setPhoneNumber(phoneNumber);
    }
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:Conversation.java

示例8: isAnonymous

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean isAnonymous(){
    return this.participants.stream()
                .filter(Participant::isUser)
                .filter( p -> Participant.ANNONYMUS_USER.equals(p.getName()) )
                .findFirst()
                .isPresent();
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:Conversation.java

示例9: assignBot

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@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;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:14,代碼來源:Conversation.java

示例10: toParticipant

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@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;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:10,代碼來源:AdminUser.java

示例11: isUserMessage

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean isUserMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isUser()){
        return true;
    }
    return false;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:ConversationMessage.java

示例12: isBotMessage

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean isBotMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isBot()){
        return true;
    }
    return false;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:ConversationMessage.java

示例13: isAgentMessage

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public boolean isAgentMessage(){
    Participant participant = getParticipant();
    if(participant != null && participant.isAgent()){
        return true;
    }
    return false;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:9,代碼來源:ConversationMessage.java

示例14: getParticipantName

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public String getParticipantName(){
    if(conversation != null)
        return conversation.findParticipantById(participantId).get().getName();
    
    return "";
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:8,代碼來源:ConversationMessage.java

示例15: getParticipant

import org.springframework.data.annotation.Transient; //導入依賴的package包/類
@Transient
public Participant getParticipant(){
    if(conversation != null)
       return conversation.getParticipants().stream()
                        .filter( p -> p.getId().equals(participantId))
                        .findFirst()
                        .orElse( null );
    return null;
}
 
開發者ID:peterjurkovic,項目名稱:travel-agency,代碼行數:10,代碼來源:ConversationMessage.java


注:本文中的org.springframework.data.annotation.Transient類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。