mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CLOUDSTACK-1176 1) remove 'final' modifier from id attribute in SnapshotVO 2) make state setter method comply with convention
This commit is contained in:
		
							parent
							
								
									7c003611d0
								
							
						
					
					
						commit
						13a4c0670e
					
				@ -31,7 +31,7 @@ public class SnapshotVO implements Snapshot {
 | 
			
		||||
    @Id
 | 
			
		||||
    @GeneratedValue(strategy=GenerationType.IDENTITY)
 | 
			
		||||
    @Column(name="id")
 | 
			
		||||
    private final long id = -1;
 | 
			
		||||
    private long id;
 | 
			
		||||
 | 
			
		||||
    @Column(name="data_center_id")
 | 
			
		||||
    long dataCenterId;
 | 
			
		||||
@ -248,7 +248,7 @@ public class SnapshotVO implements Snapshot {
 | 
			
		||||
        return state;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public void setStatus(State state) {
 | 
			
		||||
	public void setState(State state) {
 | 
			
		||||
        this.state = state;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -328,7 +328,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
 | 
			
		||||
        Transaction txn = Transaction.currentTxn();
 | 
			
		||||
        txn.start();
 | 
			
		||||
        SnapshotVO snapshotVO = (SnapshotVO)snapshot;
 | 
			
		||||
        snapshotVO.setStatus(nextState);
 | 
			
		||||
        snapshotVO.setState(nextState);
 | 
			
		||||
        super.update(snapshotVO.getId(), snapshotVO);
 | 
			
		||||
        txn.commit();
 | 
			
		||||
        return true;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user