Shark ~ [Java][Hibernate][Netty] ~ [V13]

Page 17 of 18 FirstFirst ... 79101112131415161718 LastLast
Results 241 to 255 of 259
  1. #241
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Quote Originally Posted by lRetros View Post
    ¿How is it Adil? ¿Any updates? ^_^
    Been hibernating;
    Code:
    @Entity
    @DynamicUpdate
    @Table(name = "habbos")
    public class Habbo implements Serializable {
    	@Id
    	@GeneratedValue(strategy = GenerationType.IDENTITY)
    	@Column(name = "id", unique = true, length = 10)
    	private Long id;
    	
    	@Column(name = "name", unique = true, length = 32)
    	private String name;
    	
    	@Column(name = "sso_ticket", unique = true, length = 32)
        private String sso_ticket;
    
    	@Column(name = "sso_ip", length = 39)
        private String sso_ip;
    
    	@Column(name = "figure", length = 256)
        private String figure;
    
    	@Column(name = "gender", length = 1)
        private String gender;
    
    	@Column(name = "credits")
        private Long credits;
    	
    	@Column(name = "motto")
        private String motto;
    
    	@ManyToMany( cascade = CascadeType.ALL)
    	@JoinTable(name = "habbos_friends", joinColumns = {
    			@JoinColumn(name = "habbo_id", nullable = false ) }, 
    			inverseJoinColumns = { @JoinColumn(name = "friend_id") })
        private Set<Habbo> friends;
    
    	@ManyToMany( cascade = CascadeType.ALL)
    	@JoinTable(name = "habbos_bans", joinColumns = {
    			@JoinColumn(name = "habbo_id", nullable = false) },
    			inverseJoinColumns = { @JoinColumn(name = "ban_id")})
    	private Set<Ban> bans;
    	
    	@ManyToMany(cascade = CascadeType.ALL)
    	@JoinTable(name = "habbos_friends_requests", joinColumns = {
    			@JoinColumn(name = "habbo_id", nullable = false) },
    			inverseJoinColumns = { @JoinColumn(name = "requestor_id") })
    	private Set<Habbo> friendRequests;
    	
    	@Column(name = "online")
    	private boolean isOnline;
    	
    	@ManyToOne(cascade = CascadeType.ALL)
    	private Fuserank rank;
    
        public Set<Habbo> getFriendRequests() {
    		return friendRequests;
    	}
    
    
    
    	public void setFriendRequests(Set<Habbo> friendRequests) {
    		this.friendRequests = friendRequests;
    	}
    
    	public boolean isOnline() {
    		return isOnline;
    	}
    
    
    
    	public void setOnline(boolean isOnline) {
    		this.isOnline = isOnline;
    	}
    
    
    
    
    	public Set<Ban> getBans() {
    		return bans;
    	}
    
    
    
    	public void setBans(Set<Ban> bans) {
    		this.bans = bans;
    	}
    
    
    
    	public Habbo() {
            //empty
        }
    
       
    
        public void setID(Long id) {
            this.id = id;
        }
    
        public Long getID() {
            return this.id;
        }
    
        public void setSsoIp(String ip) {
            this.sso_ip = ip;
        }
    
        public String getSsoIp() {
            return this.sso_ip;
        }
    
        public String getSsoTicket() {
            return this.sso_ticket;
        }
    
        public void setSsoTicket(String ticket) {
            this.sso_ticket = ticket;
        }
    
        public void setCredits(Long credits) {
            this.credits = credits;
        }
    
        public Long getCredits() {
            return this.credits;
        }
    
       
    
        public void setFigure(String figure) {
            this.figure = figure;
        }
    
        public String getFigure() {
            return this.figure;
        }
    
        public void setGender(String gender) {
            this.gender = gender;
        }
    
        public String getGender() {
            return this.gender;
        }
    
        public void setMotto(String motto) {
            this.motto = motto;
        }
    
        public String getMotto() {
            return this.motto;
        }
    
    	/*
    	 * Friends
    	 */
    
    
        public Set<Habbo> getFriends() {
            return this.friends;
        }
    
        public void setFriends(Set<Habbo> friends) {
            this.friends = friends;
        }
    
       
    
    	public void setName(String name) {
    		this.name = name;
    		
    	}
    	
    	public String getName() {
    		return this.name;
    	}
    
    
    
    	public Fuserank getRank() {
    		return rank;
    	}
    
    
    
    	public void setRank(Fuserank rank) {
    		this.rank = rank;
    	}
    Code:
    public Habbo loadBySso(String sso) {
    		
    		Habbo habbo = (Habbo)HibernateUtil.getCurrentSession().createCriteria(Habbo.class).add(Restrictions.eq("sso_ticket",
    				sso)).uniqueResult();
    		if(habbo != null) {
    			return habbo;
    		}
    		return null;
    	}
    	
    	public Habbo load(Long id) {
    		Habbo habbo = (Habbo)HibernateUtil.getCurrentSession().load(Habbo.class, id);
    		if(habbo != null) {
    			return habbo;
    		}
    		return null;
    	}
    	
    	public void update(Habbo habbo) {
    		HibernateUtil.getCurrentSession().update(habbo);
    	}
    	
    	public List getSimilarHabbos(String name) {
    		List habbos = HibernateUtil.getCurrentSession().createCriteria(Habbo.class).add(Restrictions.like(
    				"name","%"+name+"%")).list();
    		return habbos;
    		
    	}
    Been busy :P

    I'd love to hear any suggestions!
    Last edited by Caustik; 10-03-13 at 12:59 AM.

  2. #242
    Enthusiast Adobe is offline
    MemberRank
    Oct 2007 Join Date
    The NetherlandsLocation
    44Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Can you make Shark work too with V9?

  3. #243
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Unfinished business.
    https://github.com/adilhz/Shark

  4. #244
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Should be stuff on there now.
    Gonna get the basics done over the next few days.
    Feel free to browse, copy and fork (if you're gonna take code, just make sure you add credits ).

    I have my GCSE's in a month, so shit won't be frequent. But, after the 14th of June... :)

  5. #245
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Quote Originally Posted by Leon View Post
    This project has been in development for over 8 months and you still don't have the basics done? Wow.....
    I lost the old source.
    Last edited by Caustik; 21-04-13 at 11:48 PM.

  6. #246
    Custom Title Enabled James is offline
    LegendRank
    Jan 2007 Join Date
    DenverLocation
    2,288Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Stop arguing, back on topic now.

  7. #247
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Starting on network IO tomorrow. :)

  8. #248
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Also, I'm using Play for the web side of stuff.

  9. #249
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Got @@ implemented.
    Will work on handshake over the next few days.

  10. #250
    Ball like Wall oddzag is offline
    [VIP] MemberRank
    Aug 2009 Join Date
    AnusLocation
    432Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    kKeep working hard man, we all appreciate the effort

  11. #251
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    would anyone be interested in a j.me?

  12. #252
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Posted 16 hours ago?

    I guess not then, any updates? :)

  13. #253
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    Going to wire up Hibernate then start working on the CMS.

    https://github.com/adilhz/Shark/comm...2ac2f60d25129d
    Wired up Hibernate, will work on Spring integration when I get home.

  14. #254
    Demi-god on these 'ere wa DominicGunn is offline
    MemberRank
    Jun 2011 Join Date
    347Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    replies with generic message about being impressed with progress and not seeing too many apparent flaws

  15. #255
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: Shark ~ [Java][Hibernate][Netty] ~ [V13]

    I believe we may be doomed sometime soon



Advertisement